Select to view content in your preferred language

Edit Related Records Widget - Testers Wanted

5283
9
06-15-2016 07:35 AM
AdamDrackley
Frequent Contributor

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

9 Replies
RebeccaStrauch__GISP
MVP Emeritus
0 Kudos
AdamDrackley
Frequent Contributor

Thanks Rebecca; Reading your helpful document, I'm encouraged to see that this functionality is on Esri's radar for WAB as well.  At the very least, hopefully this widget can be a get-you-by until Related Editing functionality is built into the WAB by default.

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

I should mention, that my comment in the resource list about highly requested is my opinion just based on reading thru the mail.  Nothing scientific.  But, to help others find current Wab items on the Ideas page (I'll add these to the resource list too):

0 Kudos
RyanNosek
Frequent Contributor
0 Kudos
LianaSmith
Frequent Contributor

Adam, I tryed to test your widget, but I can not add it. I get empty message. Is there anything I should configure in the code before installing it?

0 Kudos
AdamDrackley
Frequent Contributor

Hey Liana, sorry for the delay in my reply.  When you added the widget to your stemapp, did you keep the name that the folder had when it came from github ("EditRelated_master") or did you rename it?  I believe the folder name has to be "EditRelated".

0 Kudos
DerekLaw
Esri Esteemed Contributor

All,

Just FYI, the Edit widget now supports editing related records with the latest ArcGIS Online update. Please see the blog,

 

What’s New in Web AppBuilder for ArcGIS (September 2016) | ArcGIS Blog 

 

Hope this helps,

0 Kudos
RyanNosek
Frequent Contributor

Hi dlaw-esristaff

Thanks for the awesome news! When will this update be available to the WAB for Developers? 

0 Kudos
DerekLaw
Esri Esteemed Contributor

Hi Ryan,

The next Web AppBuilder Developer Edition update will be released approx 4-5 weeks from now, so roughly mid-late October. Please see this blog post, specifically question 1

https://blogs.esri.com/esri/arcgis/2015/04/06/clarifying-3-questions-about-web-appbuilder-for-arcgis... 

Hope this helps,