Select to view content in your preferred language

Why isn't Create View Layer working for some layers?

10171
18
03-24-2020 02:47 PM
BillSchlatter
Regular Contributor

I'm attempting to upload a few small, pretty straightforward layers to ArcGIS Online, with the intent of creating a Feature Layer View of each one.  These views will have some of their attributes hidden, then be added to my organization's Open Data Portal.  The problem is, the Create View Layer process keeps failing with the extremely unhelpful message, "Error: Unable to add feature service definition", as seen in the attachment. 

This is a workflow I've used many times before without issue, and indeed, it's only happening for two of the three layers in the current batch.  The third one worked exactly as expected, and is currently in the Open Data Portal. 

Further complicating things, my attempts to do an end-run around the issue are also meeting with failure.  I made a copy of the data with the attributes we want to hide removed, uploaded the layers, and the copied layers just simply don't appear in the Open Data Portal regardless of sharing settings.  These aren't complicated datasets - they have several hundred features at most, with 6-12 attributes, mainly short text fields.  

Has anyone run into problems like these before?  Did you find any solutions?  

18 Replies
MaryMillus
Occasional Contributor

I'm also getting this error when I try to create a view layer.  I've re-published the data several times from both Pro and ArcMap.  What I have noticed:

I have three layers that have been grouped in my desktop project.  When I publish them all together to AGOL, I get the error about the service definition when I go to create a public view layer.  If I ungroup the data in my desktop, and remove the two additional layers, then re-publish... I can now create a public view layer in AGOL without any issue.  So, I'm guessing that must be it--view layers can only be created from one hosted feature layer?  If you publish multiple layers at a time, then the pubic view option does not work...?  I wish I could find documentation to confirm this is the case, and a work around.

0 Kudos
WillArellano
Regular Contributor

I am also getting the following error:

I have 6 stormwater layers that are not grouped in any way. Two of the layers have attachments, and the rest are just plain feature layers of point, line, or polygon features. They were all published to ArcGIS Online via ArcPro, and then I attempted to create feature layer views for editing permission control, and all but 1 worked as expected. One of the layers with attachments is the one that is causing me the problem, and I have no idea how to fix it. This is really killing my workflow. 

0 Kudos
WillArellano
Regular Contributor

I was able to fix my issue by exporting the layer that was giving me the issue to a FGDB, then republishing it from the FGDB (all directly on AGOL). I was then able to create my view from the newly published layer. The downside was that I then had to go fix all the web maps that contained the problem layer.  

0 Kudos
andreoudi
Occasional Contributor

Hi!

I have the same problem. I have published a feature layer to ArGIS Online via ArcGIS Pro. When I attempt to create a view layer I get the message "Unable to add feature service definition". I have tried republishing the layer (both grouped and ungrouped), exporting the layer to en FGDB and republishing but nothing works. Is there any other suggestion?

0 Kudos
SaraHopkins
Emerging Contributor

I am trying the same workflow using ArcPro but keep getting the same error.  Were you able to find a solution?

JaredPilbeam2
MVP Regular Contributor

I published a Feature Class from Pro into a folder in AGOL. I shared with a group. In AGOL I tried creating a view, but I get this same error message.

0 Kudos
SaraHopkins
Emerging Contributor

I finally got a workaround with Esri support on this one.  My issue was related to a bug where there was html in the description field of a few of my layers.  Workaround:  in ArcGIS Pro, right click on the problematic layer in the Table of Contents.  Select Properties.  Navigate to the Metadata tab and choose 'Layer has its own Metadata' from the dropdown options.  Make sure there is no text in the description.  Click 'OK'.  Then, republish the project as a web layer to ArcGIS Online.  Once the layer is published, you should then be able to create a view layer.

AlexRudowski
Occasional Contributor

Hi @SaraHopkins,

I was getting a different error (screenshot) when trying to publish a hosted layer view, "The view layer could not be created. Try again." I followed the instructions in your post and I was able to successfully publish the view layer. Thank you!

After setting up the parameters for the view layer, I kept receiving this error. After removing the metadata and changing the metadata properties before publishing the layer, I was able to successfully create new layer views.After setting up the parameters for the view layer, I kept receiving this error. After removing the metadata and changing the metadata properties before publishing the layer, I was able to successfully create new layer views.

 

Ade_Bruijn
Regular Contributor

Hi, here also the error "The view layer could not be created. Try again."

Is there a way to delete the metadata without overwriting the hosted feature service?

0 Kudos