Select to view content in your preferred language

How to use Smart Editor to require user to populate field?

6437
16
Jump to solution
07-02-2018 11:08 AM
AndresCastillo
MVP Regular Contributor

How to use Smart Editor to require user to populate field?

0 Kudos
1 Solution

Accepted Solutions
AndresCastillo
MVP Regular Contributor

Here is the solution:

Two options to do this:

1

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.

2

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.

View solution in original post

16 Replies
AndresCastillo
MVP Regular Contributor

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.

AndresCastillo
MVP Regular Contributor

Here is the solution:

Two options to do this:

1

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.

2

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.

HeathAnderson
Frequent Contributor

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?

0 Kudos
AndresCastillo
MVP Regular Contributor

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'?

0 Kudos
deleted-user-L0EwoNW-72L5
Deactivated User

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

0 Kudos
AndresCastillo
MVP Regular Contributor

Do you have access to ESRI support?

If so, can you please follow-up with them, and post the solution/bug?

Thank you.

0 Kudos
WilliamCraft
MVP Regular Contributor

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?  

0 Kudos
AndresCastillo
MVP Regular Contributor

Do you have access to ESRI support?

If so, can you please follow-up with them, and post the solution/bug?

Thank you.

0 Kudos
AndresCastillo
MVP Regular Contributor

Do you have access to ESRI support?

If so, can you please follow-up with them, and post the solution/bug?

Thank you.

0 Kudos