Create a new Hosted Feature Service Domain Type: codedvalueMultiSelect

1918
5
04-12-2019 09:14 AM
Status: Open
JohnMDye
Occasional Contributor III

Currently, ArcGIS Applications other than Survey123 are unable to support multi-value selected due to limitations on the Hosted Feature Service definition. That is, there is no way to indicate whether or not a value should be 'selected' or  'unselected' because such a value type does not exist within the hosted service definition.

Take this 'Payment Forms' field I created in a Hosted Feature Service as an example:

{
 "name" : "PAYMENT_FORMS", 
 "type" : "esriFieldTypeString", 
 "alias" : "Accepted forms of payment", 
 "sqlType" : "sqlTypeOther", 
 "length" : 50, 
 "nullable" : false, 
 "editable" : true, 
 "visible" : true, 
 "domain" : 
 {
 "type" : "codedValue", 
 "name" : "Point layer_PAYMENT_FORMS_8ff94d6b-7b8c-4f0e-8838-2fb72098a535", 
 "codedValues" : [
 {
 "name" : "Cash", 
 "code" : "CASH"
 }, 
 {
 "name" : "Check", 
 "code" : "CHECK"
 }, 
 {
 "name" : "Credit", 
 "code" : "CREDIT"
 }, 
 {
 "name" : "Money Order", 
 "code" : "MNY_ORDER"
 }, 
 {
 "name" : "Certified/Cashier's Check", 
 "code" : "CERT_CHECK"
 }, 
 {
 "name" : "Debit", 
 "code" : "DEBIT"
 }, 
 {
 "name" : "Wire Transfer", 
 "code" : "WIRE_XFER"
 }, 
 {
 "name" : "Apple Pay", 
 "code" : "APPLE_PAY"
 }, 
 {
 "name" : "Google Pay", 
 "code" : "GOOGLE_PAY"
 }, 
 {
 "name" : "Venmo", 
 "code" : "VENMO"
 }, 
 {
 "name" : "Zelle", 
 "code" : "ZELLE"
 }
 ]
 }, 
 "defaultValue" : "CASH", 
 "description" : "null"
 }

I think anyone looking at the list of values above could see what one would normally be trying to do here. Offer a list of values from which multiple could be selected or unselected, depending on the forms of payment a vendor accepted. However, it's not possible to do this with the current Hosted Service definition.

What I'm proposing is that the the 'codedvalue' domain type be forked, to create a  'codedvalueMultiSelect' domain type. Such a domain type would be identical, except that it would add a new boolean property ('isSelected') would be added to each name-code pair in the 'codedValues' array. Which would result in this structure for the above example:

{
 "name" : "PAYMENT_FORMS", 
 "type" : "esriFieldTypeString", 
 "alias" : "Accepted forms of payment", 
 "sqlType" : "sqlTypeOther", 
 "length" : 50, 
 "nullable" : false, 
 "editable" : true, 
 "visible" : true, 
 "domain" : 
 {
 "type" : "codedvalueMultiSelect", 
 "name" : "Point layer_PAYMENT_FORMS_8ff94d6b-7b8c-4f0e-8838-2fb72098a535", 
 "codedValues" : [
 {
 "name" : "Cash", 
 "code" : "CASH",
 "isSelected" : true
 }, 
 {
 "name" : "Check", 
 "code" : "CHECK",
 "isSelected" : true
 }, 
 {
 "name" : "Credit", 
 "code" : "CREDIT",
 "isSelected" : true
 }, 
 {
 "name" : "Money Order", 
 "code" : "MNY_ORDER",
 "isSelected" : false
 }, 
 {
 "name" : "Certified/Cashier's Check", 
 "code" : "CERT_CHECK",
 "isSelected" : false
 }, 
 {
 "name" : "Debit", 
 "code" : "DEBIT",
 "isSelected" : true
 }, 
 {
 "name" : "Wire Transfer", 
 "code" : "WIRE_XFER",
 "isSelected" : false
 }, 
 {
 "name" : "Apple Pay", 
 "code" : "APPLE_PAY",
 "isSelected" : true
 }, 
 {
 "name" : "Google Pay", 
 "code" : "GOOGLE_PAY",
 "isSelected" : true
 }, 
 {
 "name" : "Venmo", 
 "code" : "VENMO",
 "isSelected" : false
 }, 
 {
 "name" : "Zelle", 
 "code" : "ZELLE"
 "isSelected" : true
 }
 ]
 }, 
 "defaultValue" : "CASH", 
 "description" : "null",
 "isSelected" : true
 }

As you can see, the only things that have changed are that domainType has changed to 'codedvalueMultiSelect' and each item now has a boolean 'isSelected' property which is set to either true or false, depending on whether or not that value should display as selected.

This structure would allow other ArcGIS applications such as Collector, Workforce, OpsDashboard, WebApp Builder, Configurable Apps and pretty much all others to start supporting the much desired 'multi-select' functionality without having to do any weird CSV parsing or custom syntax management. All they need to do is look at the domain type and if it is 'codedvalueMultiSelect', then they need to read the 'isSelected' property for each domain value. From there, they can decide how to display selected and unselected values depending on the experience they want for their application.

Some might offer that this is already supported by Survey123. I realize that. This idea is requesting a new domainType so that other applications can offer the same functionality without having to do the custom CSV parsing that Survey123 does in order to offer that functionality. In fact, I'd wager that if this new domain type were created, Survey123 would switch to use this instead as it would be much easier to work with than what they are doing now. This would also allow multi-select to be supported across the entire ArcGIS Platform in all applications, rather than just in Survey123.

5 Comments
ArsenBeglaryan

I am surprised, how it is still not possible in 2022.

easchwe

This function is absolutely needed. The flagship platform, ArcGIS Pro should not have this limitation. I have a list of 18 departments that may need to be involved in a process tracked using an SDE feature class. The data entry is done by multiple staff members across departments. It is impossible to set up a domain value with all the possible combinations, since any or all of the departments may be involved, and the names are to long and similar to enter free text without tons of errors. Select multiple domain is the only way to accomplish this. The only other option I can see is to have a yes/no field for each department which would add an additional 18 fields (!) to an already large table.

A very simple and elegantly coded solution was delivered in the initial comment three and a half years ago, c'mon... Please add this functionality!

 

@KoryKramer 

asimmons

Hello from 2024. Any word on when this feature may be added? 

In my agency we would really love to select multiple domains for managing trail data in ArcGIS Pro and AGOL. 

helf0023

It would be useful for folks I work with to be able to select multiple domains as well. Recently, our team requested the ability to select multiple team members' names when collecting data in the field regarding who was performing chemical or manual treatments of invasive species onsite.

Joshua-Young

This has often been a defining limitation of ArcGIS that has cause other departments in my organization to go find a different solution to meet there business needs. It seems like this is a simple and common business need. I recently created a CIP dashboard and had to come up with an interesting workaround so users could see all the different types of infrastructure improved by a project without double counting the project. It would be easier to be able to select "Transportation; Water Distribution; Wastewater Collection;" in one field and be able to filter by any one of those values. Something else that would be cool would be to create symbology for the individual domain values and have ArcGIS combine the colors in the symbology based on what values are selected.

I will also echo that the original poster provided a simple solution to enable this functionality.