how to populate a drop down list using a subworkflow from a coded value domain.
-
- Get Coded Value Domain Activity
- URL: Your mapservice URL
- Field: Field you want to grab the Domains from
- Get Form Element Items from Collection Activity
- Collection: Your output from the Get Coded Value Domain Activity in 1 above.
- Label: name
- Value Field Name: code
- Set Form Element Items Activity
- Element: The element in the form you want to populate
- Items: The output from the Get Form Element Items in number 2
0 - Get Coded Value Domain Activity
-
Thank you very much Nelson.
I am stuck in :
Get Form Element Items from Collection Activity
- Collection: Your output from the Get Coded Value Domain Activity in 1 above.
I am writing as below
=$getDomainActivity1.domian
But it deos not work.
0 -
@Kabir Rahimi? If you use the autocompletion, it should take the right input (here I see you wrote domian instead of domain).
0 -
Dear All. It work fine and I used
=$getCodedValueDomain1.domain.codedValues in the collection. However I have another question.
Now the first drop donw is for pronvince and it worked.
I want to have a second one for district which also to be obtained from coded value but to be filtered by the first dropdown list(slected province)
I will be happy if I can have the solution
0 -
@Kabir Rahimi? if your district layer has an attribute "Province", you can just link the two dropdown lists with the "Depends on" property.
If not, you can populate the second drop down list in the change event of the first dropdown list with a Query Layer (where Province = dropdownList1.value), Get Form Elements Item from Features (features = Query.Features), then Set Form Element ITem.
0 -
Thanks from the reply but we are using survey123 for data entry and province is the first dropdown which is coming from codeddamain value. The district in the survey123 is also dropdown but the choices are filtered by province. We do not have a feature serivce for the province and district as such. We want to get both from domian coded values. If there is any method.
0 -
Hey @Kabir Rahimi? ,
I came across this post with the same requirement. I figured out something that works - it's probably not ideal and could be optimized, but it works. Basically, I query twice: once to determine an array of valid values and again to remove codedValue pairs that are not valid. It'll probably make more sense once you review the attached sample workflow.
0 -
@Kabir Rahimi? I figured out a way to simplify the workflow using arrow functions to drill down into the feature set attributes.
0
Please sign in to leave a comment.
Comments
8 comments