Possible to use {$Feature} token with workflow 5?
Hi. I'd like to pass a feature as an input parameter to my workflow. Via a hyperlink in the result for a search or maptip. So, firstly, is this possible? I have seen examples using $Geometry, but not $Feature. If yes, how would I get access to the geometry and attributes of that feature in my workflow?
Thanks
-
If your goal is to get at the geometry and attributes of the feature you should use $Graphic. This will be an instance of an Esri Graphic (https://developers.arcgis.com/javascript/3/jsapi/graphic-amd.html) which has properties for the geometry and attributes.
You can use $Feature. This will be an instance of a GVH Feature (https://docs.geocortex.com/essentials/gvh/2.10/api-help/classes/_mapping_infrastructure_amd_d_._geocortex_infrastructure_feature_.feature.html) which has an esriFeature property that is the exact same thing that $Graphic provides. I would recommend using $Graphic instead of $Feature unless there is something very specific about $Feature that you need.
For anyone looking for the documentation on this you can find it here https://docs.geocortex.com/workflow/latest/help/Default.htm#wf5/help/run-workflows-in-gvh.htm#Use_a_Hyperlink_to_Run_a_Workflow_with_Inputs%3FTocPath%3DRun%2520Workflows%2520in%2520the%2520Geocortex%2520Viewer%2520for%2520HTML5%7CRun%2520a%2520Workflow%2520with%2520Inputs%7C_____1.
--Ryan
0 -
Ryan, thanks for the info. I have this working. For anyone interested, you can reference geometry and attributes like below:
geom: =$getWorkflowInputs.inputs.graphic.geometry
attr: =$getWorkflowInputs.inputs.graphic.attributes.FACILITYID
The link would be like <a href="command:RunWorkflowByUrlAndInputs?url=url&graphic={$Graphic}">Create Redline</a>
0
Please sign in to leave a comment.
Comments
2 comments