Hoppa till huvudinnehållet

how to populate a drop down list using a subworkflow from a coded value domain.

Kommentarer

8 kommentarer

  • Nelson Dobbs
    1. Get Coded Value Domain Activity
      1. URL: Your mapservice URL
      2. Field: Field you want to grab the Domains from
    2. Get Form Element Items from Collection Activity
      1. Collection: Your output from the Get Coded Value Domain Activity in 1 above.
      2. Label: name
      3. Value Field Name: code
    3. Set Form Element Items Activity
      1. Element: The element in the form you want to populate
      2. Items: The output from the Get Form Element Items in number 2

     

     

     

    0
  • Permanently deleted user

    Thank you very much Nelson.

     

    I am stuck in :

     

    Get Form Element Items from Collection Activity

    1. 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
  • Guillaume Ruelle

    @Kabir Rahimi? If you use the autocompletion, it should take the right input (here I see you wrote domian instead of domain).

    0
  • Permanently deleted user

    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
  • Guillaume Ruelle

    @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
  • Permanently deleted user

    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
  • Permanently deleted user

    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
  • Permanently deleted user

    @Kabir Rahimi? I figured out a way to simplify the workflow using arrow functions to drill down into the feature set attributes.

    0

Du måste logga in om du vill lämna en kommentar.