Skip to main content

Set Current Form Element Item for Drop Down List on form reload using previously selected item

Comments

2 comments

  • Amanda Frech

    Hi Aaron, I set up what I imagine you described.  Maybe you can check how yours differs from my copy, since mine seems to work as expected when I run it in the workflow designer sandbox.

    To open a copy of mine, use File > Open by URL, and paste https://www.arcgis.com/home/item.html?id=86115a358bfe4addade051fb7c96fa47 like this:

     

    Some ideas on possible differences to look for:

    - maybe you're running the workflow twice rather than reloading the form within one run?

    - maybe your dropdown list is populated differently, eg. using hardcoded values instead of Get Form Elements from Features?

    - maybe you are using Get Form Element Items From Features, but the configuration is significantly different?

    - maybe the location of the Create Value or Set Property activities is different in yours?

    - maybe your Load event is configured on a different element?

    There was a bug in Mobile for “Set Current Form Element Item” that got fixed recently in 5.43, but since you mentioned checking Chrome's developer tools as well, I'm assuming your testing isn't exclusive to Go.

    1
  • Aron Bird

    Thanks for the reply and the sample.  I managed to figure out what the problem was and it is now functioning.

    In the load event for the dropdown, I also have an If activity but in my workflow, the condition included two single apostrophe's instead of undefined that was used in your workflow.

     

    My condition that didn't work

    =$varParkName != ‘’

    Your condition that did work.

    =$varParkName != undefined

     

    My syntax worked for the text box but not for the dropdown item.  I guess it must have to be something about the dropdown list form type, much like how the Set Form Item Property doesn't work on the dropdown and you have to use the Set Current Form Element Item for the dropdown.

    Anyway, I'm glad it is working.  Thanks for your assistance!

    Aron

     

    1

Please sign in to leave a comment.