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.
I am unable to add and expression to require the field. I had originally published this dataset with and definition query. Could that be affecting the ability to add and expression? Thoughts/suggestions?
It is possible that the definition query might be causing this, but I don't think so.
Are you saying that nothing happens when you click 'Add Expression'?
I also have this issue. Both Add expression and Add set do nothing when clicked. They are slightly greyed out too. All the feature classes have the same issue
Do you have access to ESRI support?
If so, can you please follow-up with them, and post the solution/bug?
I am also seeing this issue with Portal 10.6.1 on Windows. Might there be an issue in the underlying database (in our case, Oracle 11g) that would prevent this setting from be configurable in the widget UI?
Yes, i have access to ESRI Support. I will call and ask them about this issue? I know that William mentioned it as possible database issue. We have a SQL environment.
I got on AGOL, the expression is no longer grayed out and the required field works as mentioned in the correct answer.
Thank you for verifying that Heath
Just so I'm clear in what you're saying, it does not work in Portal but it does work in ArcGIS Online?
That is correct. We are running Portal at 10.6.1 and it does not work. However, it does work in ArcGIS Online.
Retrieving data ...