Select to view content in your preferred language

Make field "Required" based on the condition of another field.

738
2
01-02-2019 01:37 PM
TheKenerson
Occasional Contributor

Hi,

       I am customizing smart editor and I am looking to make a field required based on the condition of another field.

       For example, I am collecting information of a maintenance task for a city. When the field name "STATUS" changes from "planned" to "completed" I would like the field "completionTime" to be required.

       Just not sure how to do it in the Smart Editor Widget code....

Thank You.

2 Replies
RobertScheitlin__GISP
MVP Emeritus

The Kenerson,

   To make a certain field required based on the value of another field is easy. In the widgets setup you open the "Configure fields for X" where X is your layer. In that dialog you find the field you want to require and click on the pencil (that appears on the far right when you hover over that row). On the new dialog find the required row and click on the pencil icon and add an expression for your other field that will control the required requirement.

MarquesMunson1
Occasional Contributor

Hello Robert,

I am trying your method on a layer, where I have a field named "level" and and another field named "date." I would like it so that whenever the level field is changed, the date field must be changed as well. So, should I put in an expression regarding the level field, after clicking the pencil for the required date field?

0 Kudos