Use Coded Value Domain in suggestion sub workflow for display form
I want to use a coded value domain in a dislpay form auto-complete suggestion sub workflow but I can't figure out a way to limit the domain values based on the text typed into the form. I've tried looping through the list of domain values and removing all items that don't match the typed in text but that isn't actually doing anything and I still see all domains in the suggestions list. Is there another way to do this? Preferably without looping through the entire list.
-
Hi Heidi,
Looping through the list will probably be the most reliable way to do this, since there's no endpoint on the ArcGIS layer specifically for querying the domains. We can query the features in the layer, but there'll be two caveats:
- It'll return just the code value, not the description value
- It'll only return values that features are currently using. So if your domain has 30 options but all your features use just the first 2 options, you won't get back the other 28 values
I'd recommend creating an empty array, then looping through the domain and adding "matching" entries to the new array, rather than trying to remove them from the existing one.
I've attached an example with both approaches. It uses the REQUESTTYPE field from
https://prod-dmarc.geocortex.com/arcgis/rest/services/LosAngeles/LA_Editing/FeatureServer/0
You should be able to import it and run it in the workflow sandbox.
0
Please sign in to leave a comment.
Comments
1 comment