Get Esri Attribute value from Workflow Input
Hi all,
Apologies for the basic question, but I am having an incredible amount of difficulty trying to figure out how to get a usable attribute value from a simple Workflow Input. I have spent a long time viewing every question, resource, examples and API I can find, but I have made little progress.
I am clearly missing something simple, but I am not sure what.
In Geocortex Web - Feature Actions Menu - I am attempting to launch a Custom Workflow.
-In my workflow I have 'GetWorkflowInputs".
-I check if output is defined with '$getWorkflowInputs1.inputs.context == undefined'
-I convert the output to JSON and see its contents as expected.
-Here is where I am getting stuck.
I have attempted to 'Convert To JSON' and 'Get Feature Set From JSON' to get an esri.FeatureSet Type, then feed that into 'Get Feature Attribute Value' and finally to an 'Alert' but I can't seem to tell what's going on, as when the workflow fails it simply exits.
My biggest difficulty is in troubleshooting. I can't find a way to tell what the variable types are, or what's in them. the Browser 'Console' doesn't appear to shed any light on this either.
Any assistance would be appreciated.
-
Hi Michael,
I'm sorry to hear the answer to this has been difficult to find. You are right about using the Get Workflow Inputs activity first of all. From there, you use $getWorkflowInputs1.inputs["inputName"] to get the value of a given input.
That said, it sounds like you're already doing that and looking at the "context" input, so I assume you are running your workflow from a feature pop up or something like that.
From there, I would suggest you use an activity like Get Feature Attribute Value to retrieve a particular value from the feature/features in the context.
I hope this helps!
0 -
Sorry, I didn't fully read your comment. I see you did try to use this activity already. Maybe you could try using it without converting, though. I think the feature(s) in the context might already be a feature(set).
0 -
I'm having the same issue. I am running my workflow from GXW's Results Details pane. It runs after selecting a single feature in the map.
I understand from the help that the workflow input 'context' is supposed to return a feature set but how do I extract the value of an attribute from this.
My 'Get Workflow Inputs' activity has the id 'wfInput' so:
=$wfInput.inputs.context should return a featureset.
I then use a 'Get Feature Attribute Value' activity with =$wfInput.inputs.context for its Features parameter and SECT_ID (the attribute I'm trying to get the value of) as its Attribute parameter.
If I use a 'Log' activity with =$attributeValue1.value for its message this returns an undefined value.
What am I doing wrong?
After examining $wfInput.inputs.context more closely I see I can get:
=$wfInput.inputs.context[0].attributes._originalMap
But this seems very convoluted and still doesn't get me the actual attribute value.
0 -
@Mark Norbury? , I think you're close. I discovered we actually have a help page related this which might give you the details you need. It even includes an example which demonstrates how to list the attributes of features.
Please refer to this page:
0 -
Here you go!
0 -
Thanks very much.😀
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
6 Kommentare