Not all layers get loaded in Collector for ArcGIS

11241
43
Jump to solution
12-10-2018 07:48 PM
MarcoPoetsch_ret
New Contributor III

Hi all,

I created a map for collecting data via Collector for ArcGIS (Version 18.1.0).

This map includes three editable layers (1x points, 1x lines and 1x polygons)
However, when I open this map in Collector for ArcGIS on the iPad (iOS 12) only one of these layers get loaded into the map. Which one seems to be randomly...

The error message I got is:

Domain: com.esri.arcgis.runtime.error

Code: 3054

Description:The item to be created already exists in the database

The three layers were created via the AGOL collector template and have the same fields.

Tags (2)
43 Replies
ChadMinteer
Occasional Contributor

"To take advantage of it in your existing layers, you need to edit the list in the Item Details page and resave it. It can be as simple of an edit as removing a space and putting it back and clicking 'Save'."

Are you talking about editing the domain list for a hosted feature layer in the Data > Fields > FieldName > List of Values?  Or are you talking about just making a change to one of the layer names in the Item Details page (I think that's what you mean.)  How do you know the layer has been updated?  Does the internal domain name for the field change (for example, when you look at the domain in ArcGIS Pro > Deploy ArcGIS Solutions Pro add-in > Modify Domains?  Or does something else about the service change in such a way that Runtime / Collector knows about it and handles the "duplicate" domain names correctly?

0 Kudos
Kylie
by Esri Regular Contributor
Esri Regular Contributor

Hi Chad - If you are seeing the error because you have different domains on fields of the same name, then you just need to edit the domain list for the layers. When the domains are resaved, their names are updated by ArcGIS Online and the names of the domains are then unique. This removes the problem since there are no longer domains with the same name and different values.

Esri Education Team
ChadMinteer
Occasional Contributor

Hi Kylie, thank you for your reply.  So if I have for example TrapLocation, SampleLocation, LandingCountLocation all with a field called Priority, do I need to edit each of these domains to make the change?  How can I verify that the names are updated by ArcGIS Online?  The ArcGIS Pro AGO Deployment Tool plug-in shows the name of domains, but I think what it shows to users would not change, correct?

0 Kudos
Kylie
by Esri Regular Contributor
Esri Regular Contributor

Yes, if those three domains have different values you'd want to edit each of them. Really you want to resave them (and to save requires a change). That will rename them (instead of just using the field name, ArcGIS Online now also uses other information to create unique names). I'm not versed in that tool and am not sure if it would show this or not. What shows to users doesn't change, it is the domain name in the underlying database that you are actually updating.

Esri Education Team
0 Kudos
ChadMinteer
Occasional Contributor

Sorry for all the follow-up questions... but, do I have to make the change to the Domain through ArcGIS Online front-end, or could I make the change through the REST admin endpoint?  Reason I ask is that the affected data model in our case has 21 different fields that are duplicated at least once which have domains, across 39 different layers in the feature service, for 20 different deployments.  The fact that we have to make an individual change on each list for each field in each layer on each service is incredibly time consuming and error prone.  

Any suggestions?

0 Kudos
Kylie
by Esri Regular Contributor
Esri Regular Contributor

Hi Chad - I haven't tried it, and the recommended approach is to use the front-end as going through the REST admin endpoint can always introduce user-error  But I've been told that it should work to go through the REST admin endpoint as the calls that need to be made to update the domain name behind-the-scenes should still get called in that case. 

Esri Education Team
0 Kudos
ChadMinteer
Occasional Contributor

Hi Kylie, we aren't finding this method to work.  For example, if I have ProposedTreatmentArea and Treatment both with a field called Method, I can create this error by changing the domain on one of them.  If I edit the domain on both of those fields, I still get the error.  Shouldn't editing the domain list through ArcGIS Online cause the domain to be resaved with a unique name so that this doesn't happen?  

0 Kudos
Kylie
by Esri Regular Contributor
Esri Regular Contributor

Hi Chad - Are you editing the domains while you have the map open in Collector? If so, please try closing and reopening the app. If that isn't what you're hitting here, could you specify for me what error you are seeing by changing the domain on one of them? Also, were these layers published through ArcGIS Online, or did you publish them using Pro or ArcMap? The fix only applies to layers created in ArcGIS Online.

Esri Education Team
0 Kudos
ChadMinteer
Occasional Contributor

Hi Kylie.  No we don't have the map open in Collector.  What we're seeing is that after changing the domain on one of these fields so that the domain lists do not match, we will get the error "Domain already exists".  The layer was originally published from Pro to ArcGIS Online (Share As Web Layer).  I wasn't aware that the fix would only apply to layers created in ArcGIS Online, I thought it would apply to feature services that are hosted in ArcGIS Online.  So how can feature services that were published from Pro like that be fixed?

0 Kudos
Kylie
by Esri Regular Contributor
Esri Regular Contributor

The update made to ArcGIS Online to change how naming is done is part of the creation process there, so it is limited to layers created there. You can fix this for layers created through Pro, but the fix is a bit different. Correct me if this isn't the case for you, but I'm guessing you have two layers in different geodatabases that you published as a single service in ArcGIS Online? For example, you made a map that had the two layers in it and published the map as a service. You have two ways to fix it in that case: 

  1. Update the names of the domains in the geodatabases so that they are unique.
  2. Publish each feature class to ArcGIS Online separately, creating a separate hosted feature layer from each one. 
Esri Education Team