Skip to main content

Add/Edit records through relationship class

Comments

10 comments

  • Permanently deleted user

    Hi Dave,

    Did you get this working?

    Thanks,

    Rowena

    0
  • Permanently deleted user

    Hi Rowena,

    I never did find the answer to that.  It was a while ago, but I took a different approach to solving my particular problem.  I'll try to summarize:

    1. After you add the feature, use Assign to set a variable to theListOfResults.first().ObjectID.ToString().  This is the ID of the feature that was just created.
    2. If ObjectID isn't the primary key in your relationship, use a Query Task to return your key field using the ObjectID in the where clause.
    3. If you are working with a table that is not managed by SDE (external database table or not registered) you can use the SQL Non-Query task to perform the operation that you want to do.  Of course there could be some intermediate steps to gather any additional data that may be necessary.

    Since AddFeatures (for instance) requires an IEnumerable<Graphic>, I don't think that would be the way to do it.  I also would be concerned with using SQL Non-Query with versioning, especially if you can't use the "move edits to base" option.  Here's to hoping a Workflow Ninja Master can point us in the right direction!

    Dave

    0
  • Permanently deleted user

    Thank you for your reply, it's good to get ideas of how people are dealing with this problem.

    0
  • Permanently deleted user

    I've been fooling around with workflows and was able to create related objects to a selected feature and populate the relationship class table. Workflow involved:

    • Selecting a feature (traffic pole)
    • Display a form to add add a type of related object (lamp or sign)
    • Display a form to populate all the fields in the related table
    • Parse it all into a JSON string
    • Submit the JSON to Feature Service's "addFeatures" webrequest using the activity "WebRequest"
    • Use OIDs of the related feature/table to populate the relationship class table

    My issue is that since my data model has so many domains,I will have to hard code all the domain types into my forms. Super tedious and creates a lot of variables within workflow.

    I haven't thought about how to address editing, athough i suspect you could use the "updateFeatures" call on the feature service?

    Let me know if you're interested in the .xaml

    Geoff

     

    0
  • Permanently deleted user

    Geoff, I would be interested in the .xaml.

    Thanks,

     

    Heather
    0
  • Permanently deleted user
    Follow up 2+ years later but you can also use the Add Features activity to add a record to a table. I.e. pass a feature set or collection of graphics to Add Features. Still has the same drawback that Geoff mentioned with recreating the domain dropdowns in the form.
    0
  • Permanently deleted user
    Create records in the related table appears to work fine in GE 4.7 with GVH 2.8. I couldn’t figure out if the Edit is applicable

     

    User-added image

     

    User-added image
    0
  • Permanently deleted user
    Hi Jamal,

     

    To make your related table editable, your table must be registered as version. Please make sure that you add the table as a feature class.

     

    User-added image

     

     

     

    Best,

     

    Lubna
    0
  • Permanently deleted user
    Hi Jamal,

     

    it works me with me. Kindly find the below screenshots:

     

    _img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=90760000000ChYJ&feoid=Body&refid=0EM600000001SXp" _/_img_

     

    _img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=90760000000ChYJ&feoid=Body&refid=0EM600000001SXz" _/_img_

     

    _img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=90760000000ChYJ&feoid=Body&refid=0EM600000001SY4" _/_img_

     

    Please let me know if it works with you or not.

     

    best,

     

    Lubna
    0
  • Permanently deleted user
    Thanks. Finally, I could edit the relate table as shown in the screenshots below

     

    _img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=90760000000ChZR&feoid=Body&refid=0EM600000001SYs" _/_img_

     

    _img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=90760000000ChZR&feoid=Body&refid=0EM600000001SYx" _/_img_
    0

Please sign in to leave a comment.