Is there a method for adding change/validation event workflows to elements that are added dynamically?
I have a form that is used for editing features in our webmap. It is built dynamically from the fields from the feature class. We are trying to add validation to the form elements to help our users. When adding elements statically, there is the ability to add load/change event workflows to the elements.
Is there a method for adding change/validation event workflows to elements that are added dynamically?
We are using Geocortex Workflow 5.
-
I never figured out how to do this per se, but I have created dynamic forms with events in the elements. What I did was I created hidden "template" elements which had the change and validate logic that I wanted in them, then copied those elements, set the needed properties (element id, title, description, etc), and put them into the form. These new elements carried the logic from the "template" elements.
Also, you *could* write validation logic outside of the form and loop back to the form if validation fails.
I'll be interested to see if anyone has an actual dynamic events, I was trying to make that work when I wrote my template activity workaround. But, barring that, you might consider whether this route will give you the behavior you want.
-1 -
Zack,
Thanks. I'll test out the template option -that would likely work for the current workflow. I'm currently writing the workflow to loop back at the end but wanted to give the user a little more timely error notice.
0 -
@Zack Robison?
Hi Zack,
can i ask how you copied the form element that the change event is copied? I'm not getting change event being fired if i add reference to the template element in the "add form element" activity..
0 -
I was mistaken, the change event did not copy. There are some very ugly ways to try to force that logic to run, but I won't recommend what I found. You're better off placing the logic outside of the form and running validation logic there, then looping back to the form if validation fails.
They added a new Run Subworkflow and Set Form Element Event activities though, so as of 5.31 you can use them to make this happen.
1
Please sign in to leave a comment.
Comments
4 comments