Calculate fields for multiple features - HTML Viewer
With the HTML Viewer (2.5 for now), is there a way a user can select multiple features and edit the attributes (to be the same value) for all selected features at once?
Fire is trying to assign hazard values to buildings based on 8-9 attributes. For many buildings, they could select many at a time because all the criteria would be the same for each building and change them all at once.
If this can be done with a workflow, any similar examples would be appreciated.
If this cannot be done at 2.5, please let me know that also.
Thanks,
Carmen
0
-
Carmen, unfortunately my day job isn't agreeable with me expending time creating examples but I'm 100% confident this could be done in a day using a workflow.
Some hints for workflow activities to use...it will involve Display Capture Geometry, Query Task (for getting the features via intersect/contains), Display Form (to set values), For Each <T> (to assign values to each feature), UpdateFeatures (to update your records).0 -
Sorry, all, if it was implied that I was asking for someone to write a workflow for me. That was not my intent. I was just asking if someone had already done something similar that sharing would be appreciated.
Thanks Matthew for the tips. I am not sure why my brain didn't equate "Selecting multiple features in HTML5" with "Display Capture Geometry" for editing features. If I could only spend more consistent time with workflows then maybe I would remember!
CArmen0 -
Yes, I've done this in multiple sites for multiple cases. Here's a basic workflow that simply updates all of the features in a map layer.
https://drive.google.com/open?id=0B_hHHiqcTKMfRTkxZDhpUklGSkU
This example uses the Where argument to query the map layer, but you could just as easily query it using a geometry that your users draw. I've done this in other sites.
The trick then is to use the ForEach<Graphic> activity to assign the values for each of the attributes you want to update. They can be hard coded like in this example, or you could pass in user input.0 -
Thank you John! I'll (hopefully) get to take a look at this today.
Carmen0 -
This sounds like somehting I could use! Does this update all features in a layer or just a selection set? 0 -
The example workflow updates all features (uses a 1=1 where clause in the Query Task activity), but you could modify it to update only features that match a different query or are in a geometry. I have a version of the workflow that batch updates the features that intersect a user-input geometry. 0 -
John, would you be willing to share your version of the workflow that batch updates the features that intersect a user-input geometry?
Thanks, Stephanie
sblazey@victoria.ca (To: sblazey@victoria.ca) mailto:sblazey@victoria.ca0 -
Actually, all you need to do is add a Display Capture Geometry or Capture Geometry activity so you can use the user-input as the Geometry argument for the Query Task activity. 0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
8 kommentarer