How to use Smart Editor to require user to populate field?
Here is the solution:
Two options to do this:
From the back end:
Geodatabase Schema level:
FC must not have data in it.
Change fields individually to ‘Allow NULL values’ No.
Making a field not nullable causes the geodatabase to assign default value of 0 for numbers, and 12:00:00 AM for datetimes, and blank for string fields. Also, if a default value is assigned to the field, it will be populated.
Using this fc in an app, the blank string field has a red exclamation that requires users to populate the field before being allowed to save.
From the front end:
This is in case the FC already has data in it, and cannot change field properties to ‘Allow NULL values’.
Can leave fields set as ‘Yes’ in the schema.
Use the Smart Editor Widget:
Edit Actions required criteria, add expression on any field (regardless of data type) ‘is blank’ creates a ‘field is Null’ expression.
This makes a red exclamation point so that the user must fill in the value before being allowed to save.
You must configure each field you want required like that separately.
Note that the ‘add set’ option further delineates an expression set on the main field…it doesn’t create a requirement for the other fields separately.
I am aware of the documentation:
Smart Editor widget—Web AppBuilder for ArcGIS | ArcGIS
Yet, it seems as if I have to have an expression set for it to work.
Instead, I want to require to application's editors to fill in every field in the feature class schema before they are allowed to save the new record.
Retrieving data ...