Open Attribute Editing from Workflow
Hello Everyone,
We're trying to create a simple workflow that allows users to create a new feature and automatically populate one of the fields with the current user. Basically, it does the following:
- Get the current user
- Use display capture geometry to get the new feature geometry
- Create new graphic with captured geometry and add to collection
- Use Add Features to add the new feature collection
- Use Query Task to get the new feature as a featureset
- Assign the current user to the appropriate fields
- Update feature and refresh the map
I've tried using the "ActivateView" command with the "AttributeEditorView" as the parameter but it doesn't open anything and I'm not sure how to specify the feature I want to open it for.
We're using the HTML 2.5.2 viewer. Any help is appreciated.
Thanks!
0
-
I'd just like to add that I also tried to use the ShowFeatureAttributeEditor command which opens an empty panel containing a save and cancel button, but no attributes to edit. This command doesn't have any parameters listed in the SDK so again, I'm not sure how to specify the feature I want to open the editor for. 0 -
Have you tried the command StartEditingFeature? 0 -
Hi John,
Thanks for your response! I've tried using StartEditingFeature as you've suggested but I'm unable to get it to work. It's most likely because I can't seem to find the command in the API Reference so I'm not sure what parameter it needs.
I've tried passing a graphic, a featureset, and the first item in a featureset. I've also tried to use the Select Features/Get Selected Features before running the command but my workflow just continues to finish without displaying the attributed editing window.
Would you (or anyone else) know what parameter it needs?
Thanks!0 -
Harrold,
Have you had success with this?
Stephanie Patterson0 -
Did anyone have any success with this? 0 -
I remember getting it to work in previous versions of GE, but it hasn't worked as far as I know since GE 4.6.
Harold's situation was tricky because as he mentioned he has a ton of fields. Even so, I think using Display Forms in a workflow to edit features is worth it. It gives you much more refined control and offers all kinds of opportunities to do data validation, provide dropdowns, checkboxes, and autocomplete, and overall make the editing experience better for your users.0 -
Thanks John,
Was hoping to leverage the out of the box functions as it is a simple data entry task, was hoping to not have to "recreate the wheel". However, you do raise a great point that by using the display form I can build in data validation and better UX. Thanks for your help!0 -
Adam, have you had any success with that? I ask because my form works perfectly for updating attributes of the selected feature, but I cannot find how to make it edit the feature geometry.
My form takes as input geometry the result of a GetGeometry activity, but that does nothing. If I add "StartEditingFeature" in RunExternalCommand, it makes no difference. Can you or anybody else suggest what's wrong?
Thanks in advance!0 -
To my question above, the solution was to use a RunExternalCommand for "AddStatus" to prompt the user to click where to move the point to, followed by a CaptureGeometry activity, followed by a RunExternalCommand for "RemoveStatus", followed lastly by an Assign of the output of CaptureGeometry to [in my case] theFS.Features(0).Geometry().
All I need now is to enable the user to create a new feature0 -
We usually go with a toolbar button and the Display Capture Geometry activity. Throw it into your existing edit workflow with all that attribute management code and call it a day. 0
Please sign in to leave a comment.
Comments
10 comments