Select to view content in your preferred language

Setting required fields for a feature service in ArcGIS Online

32487
30
06-04-2014 08:37 AM
JoshWhite
Honored Contributor
I am testing out a feature service for use in web editing, primarily through Collector.  I am testing in ArcGIS Online.  I tried to edit an existing feature and there are a couple of fields that have a yellow triangle and with an exclamation point next to them and a popup that states that this value is required.  I cannot seem to figure out how this property is set.  The two fields in one particular feature that are marked as required aren't really required and other fields that should be required are not required.  How do I change the property of this?  In the feature class it seems the only thing you could change is whether or not a field is nullable but that doesn't appear to affect anything else.  The template doesn't have an option for requiring fields either.  ArcGIS Online nor Collector have any options that I can find to alter this either.  The service properties don't reference required fields either.
Josh White, AICP
Principal Planner

City of Arkansas City
Tags (2)
30 Replies
deleted-user-7SLqM7dlvYNN
Deactivated User

We struck the opposite with Portal 10.5.1 and the Edit widget in a Web App. By setting not null i.e. nullable:false and a template with fieldname:null it breaks the Edit widget. The edit widget doesn't show the attribute editing table after creating the feature and the edit fails with the server recording, "0 : ERROR: null value in column "deviceposition" violates not-null constraint ..."

If we use the Smart Edit widget it works properly and highlights to users it's a required field which must be entered. The Save button is greyed out until the required field is given a value. 

By editing the Feature Service via the admin API (thanks Kelly Gerrow) to change the Template fieldname to be nothing (""), this fixes it (the opposite of what Kelly suggested for ArcGIS Online).

Before:

After:

0 Kudos