Skip to main content

bulk copy of field values from one source to the other

Comments

7 comments

  • Nico Burgerhart
    You can do something like

     

    g = new Graphic

     

    g.attributes("OBJECTID") = fsCapturedGeom.first().attributes("OBJECTID")

     

    g.attributes("COMMENTS") = fsCapturedGeom.first().attributes("COMMENTS")

     

    g.attributes("FIRE_OBS_TYPE_PY") = fsCapturedGeom.first().attributes("FIRE_OBS_TYPE_PY")

     

    Add this graphic to a new collection (List(of graphic) and use this collection as input for an Update Features activity.
    0
  • Nico Burgerhart
    You can do something like

     

    g = new Graphic

     

    g.attributes("OBJECTID") = fsCapturedGeom.first().attributes("OBJECTID")

     

    g.attributes("COMMENTS") = fsCapturedGeom.first().attributes("COMMENTS")

     

    g.attributes("FIRE_OBS_TYPE_PY") = fsCapturedGeom.first().attributes("FIRE_OBS_TYPE_PY")

     

    Add this graphic to a new collection (List(of graphic) and use this collection as input for an Update Features activity.
    0
  • Permanently deleted user
    thanks Nico,

     

    I'll give this a go, but I'm still concerned about how it handles Null values. I still suspect that the UpdateFeatures won't like updating from a collection with Nulls in it. 
    0
  • Permanently deleted user
    Nico, I owe you a beer or two!

     

    worked like a charm. I actually made it easier to loop through all fields..

     

    copiedGraphic = fsCapturedGeom.features(0)

     

    for each key in copiedGraphic.attributes.keys

     

      g.attributes(key) = copiedgraphic.attributes(key)

     

    thanks again!

     

     
    0
  • Permanently deleted user

    @Gareth do you have a code snip for your loop I could see? I really like this but struggling to get the syntax correct.

    I have a few editing tools and its so painful to add all the attributes one by one. This loop can help me a lot.

    0
  • Permanently deleted user
    I also found this thread as I have been fighting nulls/nothing in populating a Form...been a painful journey.
    0
  • Permanently deleted user
    Dylan, 

     

    PM me at gareth.finney@delwp.vic.gov.au and I can send you the workflow to take a look at. I can't attach it here unfortunately.

     

    cheers

     

    GF
    0

Please sign in to leave a comment.