AnsweredAssumed Answered

Why doesn't the count_selected function return an integer?

Question asked by monzay on May 23, 2017
Latest reply on May 24, 2017 by JTedrick-esristaff

I was using count_selected for the first time. Help states "Returns the number of selected answers. Used for select_multiple questions". I expected it to return an integer but it returned the number as text.

 

I wanted to total the number of answers from three different select_multiple questions. 

count_selected

 

For each question I chose 1 answer and the note shows:

111

It did a concatenation instead of an addition

 

My workaround was to use the int function

int(${Repair_type_score_3}) + int(${Repair_type_score_2}) + int(${Repair_type_score_1})

 

Answer: 3

 

Ideally I would like to see the function return an actual number instead of a text number. In the meantime the Help could be updated to indicate this difference.

Outcomes