AnsweredAssumed Answered

Select Multiple - maximum/minimum calculations?

Question asked by corymcgregor on Jul 14, 2017
Latest reply on Jul 17, 2017 by JHasthorpe-esristaff
Hi,
I'm wondering if it's possible to use the Maximum and Minimum functions with select_multiple questions
I've got a series of answers with numerical equivalents, and I'd like to find the maximum or minimum value answer to use for future equations.
E.g. I want to find the minimum "size" chosen using the following questions:
TypeNameLabelCalculation
select_multiple size_listsizesAvailable Sizes
decimalminimum_sizeMinimum Available Sizemin(${sizes})
list_namenamelabel
size_list1Small
size_list2Medium
size_list3Large
The calculation I tried only works if one choice is selected:
min(${sizes})
I'm able to find the minimum with cascading if statements, but it's pretty tedious and depends on the order the values are written:
if(selected(${sizes},'1'),1,if(selected(${sizes},'2'),2,if(selected(${sizes},'3'),3,0)))
Is there a better way to accomplish this?
Thanks

Outcomes