Field name "must be unique" error only happens intermittently; also, changing a layer name requires re-configuring the whole layer?

910
2
05-16-2023 08:45 AM
Bianchig
New Contributor II

I am trying to create three similar forms in a single map in Field Maps Designer, and they share many fields, such as “site” and “species.” Since these are separate layers, it should be fine that the field names are repeated (meaning form 1 and form 2 can both have a “species” field). This has mostly been working for me. However sometimes, Field Maps won’t let me repeat field names, saying the field name “needs to be unique.” Which I have gathered in this context to be false. The only solution I’ve found is reloading the page, and only half the time it works. Does anyone else have this problem? Why is it happening, and so inconsistently? Can I configure my forms without needing to refresh the page 10 times?

Second separate problem: when I update layer names through ArcGIS online’s content tab, the name will not update in Field Maps Designer unless I remove the layer and re-add it, which is forcing me to re-configure all my forms. Since Field Maps doesn’t let us duplicate forms without some API for Python (near impossible to figure out for myself, someone without coding knowledge), I can’t duplicate the forms either. Now I am reconfiguring each form from scratch just so I can change their names. Is this really how it's supposed to work? So upsetting. I would love some help with either of these problems.

 

I ended up solving this on my own. Answers:

First question:

It is true that two different forms can have the same field names, as I thought above. The reason I was getting the error "Field name must be unique" is because I was accidentally creating duplicate fields within the same form, because I didn't know the following:

  • When you remove a layer then re-add it to Field Maps Designer, it first looks like the form's contents have been deleted. However, removing a layer from FMD doesn't delete its fields, and they can still be found and edited in ArcGIS Online --> Content --> (Layer of interest) --> Data --> Fields.

So if you remove then add back in a layer to FMD, see that the form is blank, then try to create new fields to rewrite what you had before, it will give the error "Must be unique" when entering field name. This is because, again, the fields were never deleted. To add these fields back into the form, simply scroll to the bottom of the "Form builder" pane, and they should be there, unless you deleted them from ArcGIS Online's "Content" page.

Second question:

This question was mostly answered with the first. Some points for this one:

  • It is true that you cannot rename layers in Field Maps Designer. It must be done in the "Content" page in ArcGIS Online (or in Pro, etc). 
  • To make your field map reflect the layer's new name, you must remove the layer then re-add it to the Field Maps Designer once the name is changed. But contrary to what I had thought before, you do not need to re-configure the map from scratch, because the fields should all still be saved. As I said above, just scroll to the bottom of the "Form builder" pane in FMD and your fields will be there.

 

 

0 Kudos
2 Replies
JustinReynolds
Occasional Contributor III

Since you can't delete the post it might be worth adding the original question again and then replying to it with your solution so others may benefit from it.

- Justin Reynolds, PE
Bianchig
New Contributor II

Sounds good, I updated it!

0 Kudos