AnsweredAssumed Answered

Concatenating select_multiple with a 'Other' as an option

Question asked by ctd123 on Mar 12, 2019
Latest reply on Mar 13, 2019 by ctd123

I have a select_multiple that has a list of birds to choose from. When I choose 'Other', it opens a following question using the relevant field. This setup follows: Making Other Work Harder in Survey123 Results, but is adapted for a select_multiple. I then have a third field that is hidden that takes the answers from the previous fields and concatenates them. The concatenation is roughly as follows:

if(selected(${field_one}, 'Other'), if(count-selected(${field_one}) > 1, concat(${field_one}, ', ', ${field_two}, ${field_two}), ${field_one}).

It should read:

if (other is selected in the first field) then

   if (there is more then the other selected in the first field) then

      concatenate both fields and return


      just return second field


   just return first field


The issue is that if both fields are concatenated, the selection of other from the first field will still be listed within the string. I can remove it during the concatenation by removing the last 6 characters of the substring, but that requires it to be selected last from field one when the user is filling out the survey.

Is there anyway to force the order the answers are selected or another way to concatenate the results?