How to link output of activities in a change event in form A to the input a edit items in a form B ?
I have two forms : in one of them (form A), I have a "change event" and inside it, several activities.
In the other form (form B), I have a "populate Item" and other activities.
Is there a way to put an output from an activity from form A as an input of a form B activity, like working with "global" things?
For now, when I try to do so, I have this kind of Error : The given expression could not be evaluated. "$query2.feature.geometry" Cannot read property 'feature' of undefined
Error
sorry for this maybe basic question, I am quite new to workflow5 and geocortex in general...
-
The error is telling you that there is no object named "query2"... in scope.
Something that isn't well documented but I suspect is your problem here (given the context in your question) is that activities contained within the subworkflows of form elements, such as within a "change event", are scoped locally. This is a bit confusing because all other activities are scoped globally, whether they are contained within a forEach loop or container or whatever. So it took me a second to figure this one out myself!
If your problem here is indeed that you are trying to reference an activity contained within a form element or event subworkflow from outside of that subworkflow then you do have a few solutions.
TL;DR! The simplest solution is to create another (global) activity to hold your object of interest for you (probably "Create Value") before running the form. Then, after you've run your subworfklow activity that you want to store use "Evaluate Expression" to set the result of your global activity to the result of your subworkflow activity.
Since you're new, note that the Evaluate Expression activity takes an expression as its input, not a value. So, in our case your input would look something like
"= $globalObj.result = $query2.results"
0 -
Thank you very much !
0
Please sign in to leave a comment.
Comments
2 comments