Removing unique constraint in ArcGIS Online.

2424
15
03-20-2019 11:14 AM
BrookeNix1
New Contributor

I'm trying to remove the unique constraint from a field in ArcGIS Online.  I unchecked the box to remove the unique constraint, AGOL says is is deleting the index.  It never deletes.  How do I make this setting stick?

After waiting awhile I receive this error.

Validation failed: Field does not contain unique values. Remove duplicates and try again

0 Kudos
15 Replies
KellyGerrow
Esri Frequent Contributor

Hi Brooke,

There was an issue that has been resolved with the call that was being made to update the service definition. This has been fixed. Can you try again and verify if you get a speedier response?

If there are duplicate values in the field, you will need to remove the duplicate values if you want to assign the unique constraint.

Thanks,

Kelly

0 Kudos
BrookeNix1
New Contributor

Thank you Kelly, I was able to eventually get it updated.

0 Kudos
NathanKoski
New Contributor III

Hi Kelly,

I have been getting this similar error only when trying to add a unique index in the field's settings. I have verified that there are no duplicates, but it still claims there are. Is this the same issue that you are referencing?

Thanks,

Nate

0 Kudos
KellyGerrow
Esri Frequent Contributor

Can you share the layer? Are there perhaps 2 null or blank fields?

0 Kudos
RichardSiller
New Contributor II

Hi Kelly,

I'm having the same issue - the layer can be found here: https://swt.maps.arcgis.com/home/item.html?id=4d94870d0f184cb7809eb9be51edc024 and the field is SWT_Code. 

All the values are unique and there are no blanks. When trying to mark the field as unique, I get the following error:

"Validation failed: Field does not contain unique values. Remove duplicates and try again"

Thanks,

Richard

0 Kudos
KellyGerrow
Esri Frequent Contributor

Mike Minami‌,

Any thoughts on this? Are there any other additional requirements that would prevent someone from being able to make their fields Unique?

MikeMinami
Esri Notable Contributor

I don't know. it seems the field has unique values. khaled hassan‌ any idea?

Richard Siller‌, could you try to set the property again with the browser console window open? The request to the server failed and the UX is returning a generic error, probably incorrect in this case. I'm wondering if the console window would contain a more explicit server error message.

Mike

0 Kudos
RichardSiller
New Contributor II

Thanks for looking into this Mike. 

I've tried again but I'm afraid I don't know my way around the browser console so don't really know what i'm looking for. To my eyes, nothing changes when I try to set the unique property, but I'm almost certainly not looking in the correct place. Could you give me an idea of what I'm looking for and where? I'm using Chrome if that's important. 

Richard

0 Kudos
MikeMinami
Esri Notable Contributor

Hi Richard,

I think I may have reproduced this. So I'll let you know what I find.

Mike

0 Kudos