Joined: 08 Oct 2012
Location: United States
Online Status: Offline
Posts: 2
Topic: Formula to count multiple values from a parameter? Posted: 22 Mar 2015 at 11:46am
Hi all,
I have received a request that based upon the values entered in a parameter that can accept multiple values the column label will change. For example, if all of the values that have been selected for the parameter contain the word 'Refinance', the column label should change, otherwise it will not. I have already figured that I can use Upper Bound to determine the number of values entered in the parameter, but I am unable to figure how to do the count for the values entered in the parameter that match my criteria. Figure a loop would be needed that would say something like If instring parameter 'Refinance' then i = 1, then i = i + 1, but I am not sure of the syntax?
The thought is when the loop is finished I would compare the count for that one against the total number of values entered and if they are the same then the column label would be changed.
Any ideas on how best to do this would greatly be appreciated.
Joined: 08 Oct 2012
Location: United States
Online Status: Offline
Posts: 2
Posted: 23 Mar 2015 at 5:23am
Figured it out for those that may run into a similar issue.
Local NumberVar i := 1; Local NumberVar rc := 0; //refi count Local NumberVar nrc := 0; // non refi count
For i := 1 To UBound({?ProductTypeMove}) Do ( IF {?ProductTypeMove} LIKE '*Refi*' THEN rc:= rc + 1 ELSE nrc:= nrc + 1 ); IF nrc > 0 OR {?ProductTypeMove} = '%' THEN FALSE ELSE TRUE;
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum