Is it possible to override the list on a 'select_one' question?

448
2
06-30-2020 02:23 PM
by Anonymous User
Not applicable

1. A select_one field exists with a list of possible values (using the autocomplete appearance to narrow options as a user types.

2.  The desired value does not exist within the list. oh no!

Is it possible to allow the user to enter their own value in the field without reference to the list?

Currently the workaround is to have an 'other' option within the list and then a seperate text field that only become relevant when the 'other' value is selected from the select_one field.  This is fairly clunky and annoying to code around and format popups for etc.

0 Kudos
2 Replies
Jim-Moore
Esri Regular Contributor

Hi Stephen

While it isn't possible to have the user add their own choices to a select_one, perhaps this method might be useful:

  1. As you describe above, add a select_one question and a separate question for 'other' that is relevant only when 'other' is selected. If you do not wish to store these as fields in the feature service, make these questions 'null' in the bind::esri:fieldType column. For more, see: https://community.esri.com/groups/survey123/blog/2017/10/26/the-power-of-nothing.
  2. Add a text question that uses an if() statement in the calculation column to store the value of either the select_one or the 'other' question. For example: if(selected(${fruit},'other'),${fruit_other},${fruit})

Best,

Jim

by Anonymous User
Not applicable

Thank you Jim for that.  It is a better workaround than I initially had and does clean up the back end service considerably.