How to send a fieldvalue as input a workflow in the results window
Hi
I would like to start a workflow from the results window in de web viewer and use one of the fields as an input for the workflow. How can I set the input VTHident with the value of the field LOCVTH.
{
"id": "658c2b9a-c837-4360-9700-9b944593e5c9",
"inputs": {},
"portalItem": "https://geoportaal.scheldestromen.nl/portal/sharing/rest/content/items/554c66ab3315483ba8e923a8abf2039d",
"commandArgumentInput": "context"
}
Kind regards,
Annemiek van der Veen - van Snik
-
You know the documentation topic Use a Context Menu Item to Host and Run a Workflow with Inputs ?
You could configure this in the Feature Actions context menu configuration in the manager or in the "FeatureActions" section in the viewer configuration files.
With the {{context}} token a feature is passed into the workflow. In the workflow you should get the attribute value for VTHIDENT.
0 -
Hi Nico
Thanks for your answer. In geoweb 5.5 I am used to setup the worklows and inputs as described in your links. In de the results window in the web viewer, it needs a different format. Changes in this format wil result in an error message.
With the format as described in the links:

I have to use the format below this line. The inputargument commandArgumentInput does not contain the feature. I've also tried "{{context}}" in stead of "context"
{
"id": "658c2b9a-c837-4360-9700-9b944593e5c9",
"inputs": {},
"portalItem": "https://geoportaal.scheldestromen.nl/portal/sharing/rest/content/items/554c66ab3315483ba8e923a8abf2039d",
"commandArgumentInput": "context"
}
Kind regards Annemiek
0 -
I made a small step to the solution. I can the input argument "context" and get the feature.
0 -
The feature has no attribute values
0 -
Initially it was not clear for me you used Geocortex Web, not GVH.
Indeed you should use the configuration as described here https://docs.geocortex.com/webviewer/latest/admin-help/#gwv/add-a-workflow-to-an-app.htm#use-the-menu-context-as-a-workflow-input%3FTocPath%3DConfiguration%7CAdd%2520a%2520Workflow%2520to%2520an%2520App%7C_____4.
I've not yet used this.
I'm not sure this will work on an individual feature or only on the whole Results Table, because I read here
https://docs.geocortex.com/webviewer/latest/admin-help/Default.htm#gwv/add-a-workflow-to-an-app.htm#component-menu-types-and-contexts the context of the Results Table is an array of Feature objects.
0 -
Yes I am using Geocortex Web. With this viewer the workflow input from the results window is a graphic and not a feature list as described. I am switching tot geoweb, because I need a field value in the workflow. Selecting with a graphic is not an option, because there can be more features with the same geometry.
0 -
Hi Scheldestromen,
In Web Designer, there is a workflow sample template for getting feature attributes. It may help in adjusting the workflow to achieve your goal.

Cheers,
Pairin
0 -
Hi Pairin
Thanks for your answer. It solved my problem.
Kind regards
Annemiek
0 -
Is commandArgumentInput working if a workflow is converted to a custom command in Web Viewer designer studio? I am trying to pass the context to a studio workflow. This custom command is on a layer actions menu. The first command is a custom service for can execute, but even if the only command in the array is the workflow it still does not pass in context. If the menu item command is changed to workflow by choosing a workflow from the workflow list context comes through as expected.
Is context lost when an action is part of an array? This would be an issue as we need a custom "canExecute" action on some menu items AND a workflow to run.
[{"name": "oe.layer-action-link-lookup","arguments": {}},{"name": "workflow.run","arguments": {"icon": "default-command","title": "language-designer-gen-layer-actions-menuitemtitle-w2nts6","id": "c1cf90c5-9cbe-4626-ad8e-74ec3ec29472","portalItem": "https://lib-gis1.library.oregonstate.edu/arcgis/sharing/rest/content/items/7cf907fb08b74326ae9ce8a3d949e458","commandArgumentInput": "context","inputs": {"type": "metadata"}}}]0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
9 kommentarer