Can't save Form after removing a Required field

06-08-2022 05:53 AM
Occasional Contributor

I'm in the early stages of designing a form, and had made some fields Required.  I later decided that I didn't need a particular question, so I deleted it.  But then when I try to save I get the error below:



When I try to change the field to Not Required, the option to change is greyed out.


I have not collected any records.

0 Kudos
5 Replies
Frequent Contributor III

Required fields must be added to the form.  

Basic question.  did you uncheck Required first.

Uncheck Required, save the form, then try to remove it

0 Kudos
by Anonymous User
Not applicable

Field that have a non-nullable constraint on them are always required because the database requires a value for it. If you are creating new fields/elements and you check "No" for "Allow null values in the feature layer" this adds the non-nullable constraint. This cannot be changed. You'll have to delete the field and re-add it without that constraint. You can do this by selecting the field in the "Fields" panel and then clicking the "delete" action.




0 Kudos
Occasional Contributor

@Anonymous User this makes sense...however, I tried the workflow you're suggesting and the Delete button in the Fields pane is greyed out as well.  


The tooltip on the Delete button says that "To delete fields, you must save pending edits.  However, when I try to save (when the Required Field is over to the right in Fields pane), I get this error.


Hopefully I'm missing an easy step?


Thanks for the help!


0 Kudos
Esri Regular Contributor

Hi @KatieGaut 

Unfortunately no, you're a bit stuck.  Few things you can do here.

  1. Clear your form (which will remove what you've done to date) and Save. You should now be able to delete the field.
  2. Add the field to the form and Save.  Close Field Maps and go to the Item Details of the Feature Layer in Online. On the Data tab, find the field you want to delete and click its name in the header; you should see a dropdown with an option to delete the field. Now, when you open the form in Field Maps again; you'll be prompted with a message that a field is missing.  Dismiss the message. Select the field on the canvas, and click the trash icon in the upper right to remove the field from the canvas.  You should now be able to save your form.

We know this is an issue and are thinking about how to solve it - it's a unique scenario; you have a required field that you need to delete and have outstanding form edits, which prevent you from deleting the field.

If you have any questions, let me know.


0 Kudos
Occasional Contributor

Thanks @CraigGillgrass that seemed to work!

0 Kudos