drackleyad

Edit Related Records Widget - Testers Wanted

Discussion created by drackleyad on Jun 15, 2016
Latest reply on Sep 14, 2016 by dlaw-esristaff

June 17th 2016: Just a note that I've put a flavour of the Batch Attribute Editor up that should allow for batch editing of related fields.  Note that it's still in preliminary/proof-of-concept stages and would also benefit from adventurous testers.  https://github.com/cmndrbensisko/BatchEditRelated

 

Hey all, hope things are well.  I'm not sure if someone else has encountered a similar business case, but we've run into situations where Client A would like to add a new field to Client B's dataset, which Client A would then be responsible for maintaining.  Instead of fully duplicating Client B's dataset just so that Client A can own and manage a single attribute, a more elegant solution might involve Relating a Table containing just the desired attribute and a foreign key to Client B's dataset via a 1:1 relationship, and then having Client A simply own and manage the Related Table.

 

A problem arises when we want Client A to be able to edit their related table via a FeatureService, or through the WAB in particular.  When using the built-in Editor widget to edit a feature, related fields aren't displayed for editing.

 

I've cobbled together a preliminary Edit widget which should allow you to edit any attributes (Except OIDs and Foreign Keys) within a related table in Web Appbuilder, provided that the relationship is 1:1.  Within the Editor popup, related fields should just be appended to the bottom of the field list.  If no related record exists for the currently-selected feature, a new record in the Related Table will be created for this feature once any related attributes are changed or updated via the popup, at which point any changes will be treated as typical updates.

 

It isn't highly polished yet, but feel free to experiment a bit with its capabilities and I can potentially expand it to apply to other business cases as well.  I'm not too familiar with cases where Relates and Web Editing could be usefully used together.

 

This tool has been tested to work with the LocalLayer widget.

 

https://github.com/cmndrbensisko/EditRelated

Outcomes