Skip to main content

Calculate fields for multiple features - HTML Viewer

Comments

8 comments

  • Permanently deleted user
    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
  • Carmen Durham
    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!

     

    CArmen

     

     

     
    0
  • John Nerge
    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
  • Carmen Durham
    Thank you John!   I'll (hopefully) get to take a look at this today.

     

    Carmen
    0
  • Permanently deleted user
    This sounds like somehting I could use! Does this update all features in a layer or just a selection set?
    0
  • John Nerge
    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
  • Permanently deleted user
    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.ca
    0
  • John Nerge
    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

Please sign in to leave a comment.