Is there a way to reference an activity/created property using strings?
I'm trying to set the visibility of some layers based on checkgroup values as part of running queries against the layers. The checkbox values have the names of Getlayer outputs that are run at the start of the workflow. I have a foreach setup which gets passed a list of the checkbox values and would like to be able to call the setvisibility activity in the foreach using the foreach.item value to retrieve the layer id from the GetLayer outputs.
Is it possible to create an expression that references the activity outputs using a string for the activity ID? Something along the lines of this:
=$[$foreach.item.value].layer.id
-
What you're asking for may be possible, but is highly recommended against and almost certainly unnecessary. If you must go about things this way, here is an excellent SO answer regarding some options for you... note that some of the primitives that are referenced in that thread are removed from WF5 (in this case perhaps wisely) so I can't say that you'll get this to work. I can say off the top of my head that eval isn't going to happen.
My recommendation to you is to set both the names and values of the checkboxes in the element's load event; this way, you can set the value of each checkbox element item to be the GetLayer output itself, or just the layer id.
0 -
Thanks Zack, I was simplifying the setup in the hopes that the answer would be straight forward. For design reasons I have split the overall functionally over 2 workflows 1 workflow sets up the form that has the checkbox group, this first workflow then calls the second which runs the GetLayer activities, so I wouldn't be able to do what you suggested with the load event.
0 -
You could pass the GetLayer results to the form workflow as an input argument.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare