Is Collector the only way to insert related table rows into AGOL maps?

2437
10
12-28-2016 12:27 PM
SeanSpendley1
New Contributor II

I've seen a lot about it being on the way from topics that are a year old. I have collector set up to do so, and that works fine. However, I've trained some colleagues to use the AGOL editor function to maintain/update their resources, but seem to have hit a wall in trying to manipulate related tables. Editing works just fine via collector on several devices, android and apple, but I'd like to be able to update and add to related tables from the online interface, or even an app. 

I'd just like clarification that it is not possible in the AGOL editor. 

Thanks!

0 Kudos
10 Replies
JayantaPoddar
MVP Esteemed Contributor

Did you try creating a relationship class and then publishing to AcGIS Online as a service? Let me know your observation. I haven't tried it though.

FAQ: Does ArcGIS Online support joins and relates? 



Think Location
0 Kudos
SeanSpendley1
New Contributor II

Yes I've done that for a few different projects. You can edit existing rows in related tables, but there doesn't seem to be an option to insert a new row anywhere but Collector and desktop. The people I'm making stuff for are older, and don't really use tablets or phones for much of anything, so I'm trying to make it so you can insert rows via AGOL. 

0 Kudos
SethLewis1
Occasional Contributor III

As long as you've published the Hosted Layer (or REST service) with Feature Access enabled along with Create & Update permissions, you should be able to add a new related record or edit existing records in a Web App Builder interface using the Edit widget.

I haven't been able to add a new related record using the map viewer. WAB, either AGOL or Developer Edition, should support the functionality that you're looking for however. See the below screenshots for a quick example of the approximate interface that you should see in the Edit widget popup. This is referencing a Hosted Layer I threw into AGOL just now and placed into a simple webapp builder app.

Related Record Popup

Add Related Record

KellyGerrow
Esri Frequent Contributor

Thanks Seth,

Currently it isn't possible to add related records in the Map Viewer in ArcGIS Online. There is functionality to add related records in apps hosted in ArcGIS Online, such as the Web AppBuilder or Crowdsource Manager. Check to see if your workflow will be able to be addressed with one of these apps.

-Kelly

SeanSpendley1
New Contributor II

Any reason why clicking the add button wouldn't trigger adding a record? I'm assuming it's related to the fact that I can't see the layer at all in collector right now. 

0 Kudos
SethLewis1
Occasional Contributor III

You're unable to see your feature layer at all?

As long as your spatial layer is loaded into the webmap and has been published with Create permission you should be able to view and add a new feature in Collector. 

To add a new related record you'll need to ensure that popups are enabled on any related table (which from your reply to Jayanta it sounds like you've done) and when you select Show Details after clicking on a feature, you should see New beneath the related table's name.

0 Kudos
SeanSpendley1
New Contributor II

So I've gotten the layers to appear in a canned app, and I've been able to insert records to both related tables and the shapefile in question. However, collector still won't open the layers at all. I've shared the maps/layers to different groups, and to the public in an attempt to get them to appear in collector, but the layers are still grayed out.

I've run into this problem before but, a few rounds republishing using the same parameters usually results in a functional map (eventually). Am I missing something?

0 Kudos
SeanSpendley1
New Contributor II

So I called tech support, and was on the line for hours trying to recify the situation. Republishing, creating a new database, reimporting the tables, messing with settings, and many hours later, we were no closer to a resolution. Telerik Fiddler showed "500 internal error" with no description of the issue, and the logs were no help at all. 

After no resolution from tech support, I tried the tactical nuclear option of recreating all my tables in arc. I had suspected this was what I had to do, but was avoiding it for the sake of maintaining database integrity. But creating a new table, and making sure the field types were correct has seemingly fixed my issue. I suspect that it was a data type issue, as we had imported all of the files from an Oracle database to an SQL database. There were many known issues of Date/DateTime fields creating problems, so I suspect that may have been the hurdle. 

0 Kudos
ScottPrindle
Esri Regular Contributor

Hello Sean,

A client application (Collector, Web AppBuilder, configurable apps, etc.) will be designed for a specific task. As you mentioned, Collector is one of the clients that exposes editing of related records. Other comments likely point to ArcGIS Online applications that offer this editing capability as well.

Based on this last comment, there appears to be another issue with your data model that only popped up when you got to editing through REST. Could you share more about the relationship class (primary, foreign keys, cardinality, etc.) of the initial dataset you were working with? How many feature classes are related to this same table? How did you rebuild this dataset, and what are the date field issues you've come across? Do you have Editor Tracking or Ownership-Based Access Control enabled on these layers?

-Scott

0 Kudos