Multiple choice option in Field Maps

8854
27
10-06-2021 08:30 AM
Status: Open
Labels (1)
ZoeBroek
Occasional Contributor

I'd like to have a multiple choice option in Fieldmaps. The current version of Field Maps (Oct 2021) has  limited options for data collection. When collecting an attribute value I sometimes need people to fill in multiple values form the same domain list. I'd like them to be able to select multiple values from the combobox or radio buttons. 

I'm hoping this function will be added with the new function of creating elements form scratch (kinda like the different options in de survey123, preferably the Multiple Choice) but also not like that, because I need them to use my domain values and not create a new field.

Does anyone have a smart workaround for this in the meantime? 

27 Comments
AarushiJhatro

A big YES to this post as I run into the same issue frequently.

My work around was to create an individual field for each value in the domain list. I edited each field to have a 'Yes' or 'No' domain list, and used the switch option on smart forms to make it easier for surveyors to select. However, this is a very limited solution, especially if you have a long domain list. 

Hoping we have the ability to select multiple choices in a list soon. 

ZoeBroek

@AarushiJhatro That's a very time consuming solution. But I might use this for my smaller domain lists in the meantime, thanks!

 

AlfredBaldenweck

Something that may also work for you is using Survey123 to edit the feature after you take the geometry.

Use Survey123 with existing feature layers—ArcGIS Survey123 | Documentation

ChristianBPedersen

This is really a vital option for our use of the ArcGIS Field Maps data collection in our organisation.

We are hoping to use this app for our geologist’s field work, but we need to be able to make multiple choice selection one or more vital information for certain attributes such as lithology description, mineralogy composition, fossil classification etc. from one data point collection.

 

 

 

BradBolton1

I'd also like to comment the need for selecting multiple options in a list. We have staff needing to select one or more permit violations when visiting many different parcels.

Woodpecker

I come across that kind of issues quite often as well. The best thing I could think of so far, is using a bit of Arcade magic to put together a workaround. The script looks something like this:

// $feature["Options"] will be a field with the domain list. Make sure to add  a domain "Clear list" to the choices
// $feature["Options_List"] is a field that will store the concatenated values

var selection = $feature["Options"]
var thisFieldValue = $feature["Options_List"]

if (IsEmpty(thisFieldValue)) {
    return selection
    
} else if (selection == "Clear list") {
    return ''
    
} else if (Find(selection, thisFieldValue) != -1) {
    return thisFieldValue

} else {
    return thisFieldValue + ', ' + selection
}

Basically what you are doing is adding domains in the 'Options List' based on the selection in 'Options' field. When adding text in the Options list, they will be separated by comma. 

You will also need to add 'Clear selection' which will simply erase everything in the Options list. This allows user to clear the field if they accidentally selected the domain they didn't want. 

You will also need to prevent a single domain being added to the Options list multiple times (lines 13 and 14). 

Hope this helps

 

 

AdewaleFalaye

@Woodpecker can you please elaborate more on this. I have tried this and its not working for me. It is still picking single option on the domain list. After picking the second option, it switched from the first option selected. Thanks in advance.

DavidPuckettSEA

An up-vote for multi-select fields.

We have also implemented the 'different field for each option' approach but users don't love it. @Woodpecker if you'd be willing to elaborate on your solution we would certainly all benefit. The logic makes sense to me as I am a developer but I am brand spanking new to Field Maps.

Woodpecker

@DavidPuckettSEA @AdewaleFalaye  

How I set this up, is having 2 different fields for each multiple choice question.

First one will have the list of values/domains assigned to it from which a user will need to pick. Let's call it values. 

The second one will be an empty text field. You will need to apply the calculations to this field (Calculated expressions). Let's call this one multiple_choice_list.

 

var values = $feature["values"] // Let's imagine the values field includes domains ["red", "blue", "green", "yellow"] 
var multiple_choice_list = $feature["multiple_choice_list"]

 

With the code below, anything that a user selects in a 'values' field, will be added to the 'multiple_choice_list' field. 

 

if (IsEmpty(multiple_choice_list)) {
    return values
} else {
    return multiple_choice_list + values
}

 

Sure, every time user changes the selection in 'values' field, the value in that field will change accordingly - it won't store multiple selections. But at the same time, it will be added to the multiple_choice_list field (which is where you store the data). 

The other else if statements from my original post are additional clauses that: 

  • Reset the multiple_choice_list if a user made a mistake and selected a wrong value. 
  • Prevent multiple entries of the same value
  • Format the choices and separate them by comma

Hope this makes sense, but if not, please let me know and I'll try to explain further. I might share a screen recording, just so you can see how the expected output looks like. 

Cheers 

FlorianTubbesing

Also a big yes from my side!

The Workaround with two fields and Arcade Expression works but it is not handy for the enduser and could not be the solution for our customers.

However i think it is a key feature for many szenarios we had actually and i hope we will see this in the near future.