Pass an argument with MapTipActions module
We have a site application currently that only requires one report (parcel info). With the update to HTML5 2.5 and GE 4.4 the Map Tip uses the command for ListReports (Run a Report), to list all available reports.
_img_ alt="Run a Report" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=90660000000Xa5s&feoid=Body&refid=0EM60000000XqJQ"_/_img_
We would like to reduce confusion, clicks, and processing to have it connect directly to our workflow and report.
So under the MapTipActions module I'm trying to modify the command used from ListReports to RunWorkflowWithArguments.
From this:
_img_ alt="List Reports Code" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=90660000000Xa5s&feoid=Body&refid=0EM60000000XqJV"_/_img_
To this:
_img_ alt="Runworkflowwitharguments" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=90660000000Xa5s&feoid=Body&refid=0EM60000000XqJa"_/_img_
The workflow works, but the value is not being passed, and I'm assuming it's due to syntax, but not sure what needs to be done as I've tried a variety of syntax. I can place a static value here (in the red circled area as seen above) and it works, but we need to pass the argument. Any thoughts how this can be achieved, and maybe there is a different command or way to accomplish this that I'm not thinking about. Thanks for your help
0
-
I haven't run a workflow as a map tip action, but I run reports in the feature description and long description using RunWorkflowWithArguments.
<a href="command:RunWorkflowWithArguments?workflowId=WorkflowName&id={YourField}">Link text</a>0 -
I have a similar question, that I am hoping you can help me with John...
I have a workflow, with arguments, I'd like to execute from a map tip's hyperlink. The argument of interest is the Map Service ID. Eventually I want to be able to pass in the Layer Id and ObjectId as well. The syntax in my Feature Description is:
<div><a href="command:RunWorkflowWithArguments?workflowId=1&msId={MapServiceId}" style="font-size: 13.3333px;">Put in WETS</a></div>
My argument in my workflow to be executed is an object, named msId. The worklfow DOES execute from the map tip, but my msId argument is null. It is supposed to be 7.
Is there anything any one knows about this? Am I missing something like a Property in the workflow?
Thanks!0 -
I tried running a workflow to pull in the map service ID and present it in an alert, and the alert was blank. When I changed the input argument from the MapServiceId to OBJECTID, the alert was populated.
Base on those results, my guess is that RunWorkflowWithArguments works with Field Tokens but not Map Service Tokens.0 -
Hi John,
I opened up a ticket about this. Apparently passing the Field Tokens is a bug in HTML 2.5.1, and is scheduled for a fix in 2.6.
Also, I did have to change the Look and Feel tab's default of for Map Tips... from Feature Long Description to Feature Description. That is the part that really got me.
Anyway, my issue is solved, but I am having to hard code the MS ID & Lyr ID into my 'a href' url for my RunWorkflowWithArguments.0 -
Good Afternoon! I am having a similar issue! I would like to run a workflow from a maptipaction. I have configured a simple Alert workflow that uses a features recordID as an input argument and displays the recordID in the Alert. I have configured the desktop.json...
{
"text": "@language-menu-complaint",
"description": "@language-menu-run-report-desc",
"command": "RunWorkflowWithArguments",
"commandParameter": {
"workflowId": "Argument",
"WhereClause": "recordID='{recordID}'"
},
"hideOnDisable": false
},
However, the alert just shows up blank...Is this functionality even possible? Thanks!0 -
Try replacing the field token with an actual value and see if it shows up in the alert. Is recordID a string? 0 -
Yes, recordID is a string. When I replace recordID from this...
{
"text": "@language-menu-complaint",
"description": "@language-menu-run-report-desc",
"command": "RunWorkflowWithArguments",
"commandParameter": {
"workflowId": "Argument",
"WhereClause": "recordID='{recordID}'"
},
"hideOnDisable": false
},
To this...
{
"text": "@language-menu-complaint",
"description": "@language-menu-run-report-desc",
"command": "RunWorkflowWithArguments",
"commandParameter": {
"workflowId": "Argument",
"WhereClause": "recordID='{Hey}'"
},
"hideOnDisable": false
},
The Alert still shows up blank.0 -
I'm not sure why your Alert is still blank. Does your alert show the right value when you run it in Workflow Simulator?
I am having the same issue as the original poster. My workflow runs fine from MapTip Actions, but does not pull the field toekn value from the feature. Not sure if it's even possible to pull the feature's attributes into the workflow from the MapTip Actions.0 -
When I enter "Test" in the Default Value in the recordID argument, Test shows up in the Alert in the Simulator. But like you and the original poster, I need to pull the token into the workflow, not a static value...Hopefully we can get some input from LG? 0 -
It may be by design, since you don't know what feature the MapTip will return and your workflow is probably for a specific feature. As John mentioned earlier in the post, running workflows from the body of the MapTip works great. 0 -
I don't think you can pass the Feature attribute value through the Token from "MapTipActions" menu item.
With only configuration on viewer configuration, I think we are on stuck to achieve what you want to do.
However, you can code the custom command, and configure it on your "MapTipActions". Your command will be received the Feature object, so on the command handhler, execute the command 'RunWorkflowArguments" with the proper inArgument extracted from Feature's attribute. That is what I would like to do,and I did for other service project.
Below is how you can debugging what is going on.
From the context of "MapTipActions" menu, a GVH Feature object is available on the command. So {{contenxt}} is the GVH Feature Object from which you can't extract the attribute value by configuration as far as I know.
You can check what is passed using the Chrome(or IE) Develoepr tool - Open up the GVH mapping.js, and put the breakpoint on the RunWorkflowWithArguments"' commands handler so that you can check what is passed See the screenshot).
0 -
Everyone, I found that my tokens were not working and also found how to fix them. I'm not sure if it's the same problem everyone else it having.
THE FIX: You'll notice that if you go into the GE essentials manager and then into the layer in question there is a tab called "Fields". You can add/remove and provide an alias for the fields. The issue I found was that the hyperlink label became populated for some unknown reason and that is what was causing my problem. Both removing the hyperlink label OR removing the field definition will fix the problem.0
Please sign in to leave a comment.
Comments
12 comments