using {{context}} in HTML5 viewer
In HTML5 viewer's desktop.json file we have following section that shows dropdown menu for Result List:
{
"text": "@language-menu-export-results-to-xlsx",
"description": "@language-menu-export-results-to-xlsx-desc",
"iconUri": "Resources/Images/Icons/Toolbar/xlsx-export-24.png",
"hideOnDisable": true,
"command": "ExportResultsTo",
"commandParameter": {
"format": "xlsx",
"fsc": "{{context}}"
}
etc....
Is there any way I can pass this {{context}} featureset collection to my custom workflow and do further processing on it??
Thanks
Muhammad Almas
0
-
I am also curious how to use {{context}}. Attempting to use {{context}} with the command RunWorkflowWithArguments throws an error:
Essentials.js:530 Uncaught TypeError: Converting circular structure to JSON"command": "RunWorkflowWithArguments", "commandParameter": { "workflowId": "myWorkflowID", "WhereClause": "{{context}}" },0 -
Any luck on this one so far? 0 -
Hi everyone,
To my knowledge, it isn't possible to send {{context}} from the results list menu to a workflow, due to the issue that Tyson posted. But you should be able to use the "Get Selected Features" activity as a replacement in order to use your current selection in a workflow.
For reference, it is possible to send {{context}} to a workflow from some locations (eg. right-click map context menu, feature action menu). To do so, you need to have an input argument in the workflow with a type that can accept the value of {{context}}. Here's another thread that has an example of this with the right-click map context menu- look for the response from Marshall that has the screenshots (https://support.geocortex.com/essentialsGSCForum?sub-nav=forum&main-nav=essentials&#!/feedtype=SINGLE_QUESTION_DETAIL&criteria=ALLQUESTIONS&id=9066000000006NFAAY) .
Hope that helps!
Amanda0 -
Hi Amanda,
Thanks for confirm that. Is it possible for the developer or support team to post an article with a bit more about how to use {{context}}, e.g. where it can be use, what argument types should be used to capture etc.
In our case we need pass the features of the specific layer in the identify result list to workflow. Just like how the Export to shp/csv/xls does in the result layer context menue. The problem with using "Get Selected Features" is it return features in all selected layers. Therefore I have to ask user to remove unwanted layers from the result list before run the workflow. If we could pass the selected features of the layer as {{context}} to workflow then the workflow would be much simple and more intuitive.0 -
I would also like to know more about {{context}} - what can it contain? Is there some guidance on what this contains based on how it is called? 0 -
@Latitude
Was this error "Uncaught TypeError: Converting circular structure to JSON" ever fixed?0 -
Hi Nico,
I see that issue was filed as GVH-3982 and fixed for version 2.3 of GVH.
Regards,
Wayne Richard
Latitude Geographics Group Ltd.
Head Office: 300 – 1117 Wharf Street Victoria, BC Canada V8W 1T7
Tel: (250) 381-8130 | Fax: (250) 381-8132 | wrichard@latitudegeo.com
Developers of Geocortex web-based mapping software | www.geocortex.com
An Esri Platinum Business Partner0 -
I got it in GVH 2.7.2. Based on the description "GVH-3982 GetSelectedFeatures workflow activity fails when results are in Table View", I think it is a different issue. I'm running a workflow (command RunWorkflowWithArguments) from the FeatureActions. No use of the GetSelectedFeatures workflow activity in my case. I'm got it in the object details in the result list, not in the table view. 0 -
I had the circular structure error when running workflows from the table view a few months back with the {{context}} token as a parameter. The answer was to use workflow 5 and avoid the serialization to .Net entirely, and it worked like a charm. I made a sort of translator in workflow5 that runs from the table instead. It takes the properties that I want from the {{context}} token and passes them (as strings or whatever) to the essentials workflow which I'd already built.
@Nico, perhaps this workaround is useful to you.0 -
Thank you Zack for feedback and suggestion.
My customer uses GVH 2.7.2 so at this moment no Workflow 5 support.0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
10 kommentarer