Form Element Value Population on Load
I'm encountering an issue with dynamic form population. I have a workflow that does the following:
- User enters an ID value in one form
- A feature service is queried for this ID
- The single returned feature's “attributes” property is saved as an object in a Create Value activity
- An array that maps the attribute values to form elements is also created by Create Value
- [{"form": <form element ID>, “field”: <service field name>},{},{}…]
- In the next form, in the load event for the header the aforementioned array is iterated and the attribute values are used to populate every form element
I've noticed two odd things about this and maybe it's an async issue or something else I'm missing.
- In the Workflow sandbox (fresh browser page load), the first time I run the workflow, none of the DropDownList elements populate (all other elements populate fine, even ListBox elements)
- If I click Run Workflow immediately again, the DropDownList elements populate without issue
- In my Web app (VertiGIS Studio Web), when I run the workflow from a toolbox button, none of the DropDownList elements populate, and subsequent attempts to run the tool do not change the outcome, as happens in the sandbox.
- UPDATE: Not sure what I did, but the app seems to now match the sandbox, the first run of the workflow does not populate any ListBox elements, but subsequent runs (without refreshing browser), do work.
I don't believe it's an issue with my workflow and how I populate the elements because I've been able to get every element to populate with this method. I have an inkling that it's a timing/async issue, especially since during the 2nd run of the workflow (as mentioned re: workflow sandbox above), the form loads much faster than the first time I run the workflow.
Wondering if anyone has encountered this or has any suggestions. I'd be happy to share the workflow, too.
0
Please sign in to leave a comment.
Comments
0 comments