Link to home
Start Free TrialLog in
Avatar of MikeM670
MikeM670

asked on

Count The Number of Parameter Values entered in a Mult Selection Parameter Dialog Box

Is it possible to count the number of values entered in a multi selection parameter?

if count({?Pm-?Agency}) = 1

or

if count({?Pm-?Agency}) > 1

I get a error message “This Field Cannot Summarize”
ASKER CERTIFIED SOLUTION
Avatar of Ido Millet
Ido Millet
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MikeM670
MikeM670

ASKER

Thank you sir...that is exactly what I needed.  Below is the result of your answer.  I will use this partial code to display the agency image if the count is 1 or a default image if the array count is greater then 1.

Local numberVar Array countArray;
countArray := {?Agency};
UBound (countArray)
Could use UBound ({?Agency})

If you'd like to show images for all specified Agencies, that is possible using 2 alternative strategies...
FWIW, Count should also work.  You can use Count on an array, and (to a certain degree) CR treats multi-value parameters like arrays.  My guess is that the parameter in your first post wasn't actually a multi-value parameter.  That would give you the error that you mentioned.

 James