cancel
Showing results for 
Search instead for 
Did you mean: 

sort multiple parameters by one field & the rest other field not working!

Former Member
0 Kudos

I want to sort based on a parameter "Status"; so if the status is Funded, Funded-as Asked, or Funded - New Designation, then I want sort by date funded field. Otherwise, I want to sort Date asked field.

Here is formula and I receive this error message: This array must be subscripted. For example, Array<i>.

if ({?Status}) in ["Funded","Funded - As Asked","Funded - New Designation" ] then

{CnPrProp_1.CnPrProp_1_Date_Funded}

else

{CnPrProp_1.CnPrProp_1_Date_Asked}

Accepted Solutions (0)

Answers (4)

Answers (4)

martingoodnews50
Explorer
0 Kudos

It was not too easy till I saw your blog post about Fully Funded Scholarships 2023 In Australia Apply now. I must say it was really helpful. It's a site that offers the latest blogs for fully funded scholarships. I will like you to check out my blogs on similar explanations and I give updates about trending tips. So you can feel free to explore it.

https://www.makeoverarena.com/fully-funded-scholarships-2023-in-australia-apply-now

Former Member
0 Kudos

Thaks all. Raghavendra, your solution works like a charm. This is what I was looking for. My solution also worked but if there is the need to have more fields to be sorted, then it is inefficient solution.

Edited by: Abdillahi Youssouf on Oct 23, 2008 12:49 PM

Former Member
0 Kudos

I think this works fine

if "Funded" in {?Status}[1 to count({?Status})] or 
"Funded - As Asked" in {?Status}[1 to count({?Status})] or 
"Funded - New Designation" in {?Status}[1 to count({?Status})] then 
{CnPrProp_1.CnPrProp_1_Date_Funded}
else
 {CnPrProp_1.CnPrProp_1_Date_Asked}

Regards,

Raghavendra

Former Member
0 Kudos

FYI - I have tried this trick with multiple if's instead of an Array and it worked. But I would like to know if it is possible to have single array, rather than multiple if's.

Formula

==============================================

if ({?Status}) = "Funded" then

{CnPrProp_1.CnPrProp_1_Date_Funded}

else if ({?Status}) = "Funded - As Asked" then

{CnPrProp_1.CnPrProp_1_Date_Funded}

else if ({?Status}) = "Funded - New Designation" then

{CnPrProp_1.CnPrProp_1_Date_Funded}

else

{CnPrProp_1.CnPrProp_1_Date_Asked}

==============================================

Former Member
0 Kudos

Since the parameter is multivalued parameter you have to specify the index number like this

if {?Parameter}[1]="Funded" then {CnPrProp_1.CnPrProp_1_Date_Funded}

else

{CnPrProp_1.CnPrProp_1_Date_Asked}

or you need to use forloop to check each value exist in that list.

So I think it is better to use if else statement.

Regards,

Raghavendra