Select to view content in your preferred language

Field required based on another fields answer

1427
3
Jump to solution
11-01-2016 11:14 PM
PeterTimmers
Occasional Contributor III

I want to be able to make a field required based on the answer in another field.

e.g.  If a house has damage after a storm answer the damage type field.

You don't seem to be able to use calculations like:  ${House_Damaged} = 'Yes" in the required column like you can with relevant.

Is that correct?    We're collecting damage assessments and we have a whole bunch of fields that are only collected if the house is recorded as damaged.   We do collect non-damaged buildings around the edge of an event to show the edge of an event.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
JamesTedrick
Esri Esteemed Contributor

Hi Peter,

In the scenario you mention, you could use a combination of the required and relevant- if you have the ${House_Damaged} = "Yes" set for the relevant statement for the damage type, you can then set retired to 'yes' - this will cause the field to display and be required. Survey123 ignores the required condition when a question is not displayed (as it can't be filled out).

View solution in original post

3 Replies
IsmaelChivite
Esri Notable Contributor

Hi Peter. You are correct. The Required column at this moment only accepts an empty value (not required) or yes (required). If you think we should also allow expressions to be added in this column, please submit your request to https://community.esri.com/community/arcgis-ideas and make sure you tag it with Survey123. Thanks!

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Peter,

In the scenario you mention, you could use a combination of the required and relevant- if you have the ${House_Damaged} = "Yes" set for the relevant statement for the damage type, you can then set retired to 'yes' - this will cause the field to display and be required. Survey123 ignores the required condition when a question is not displayed (as it can't be filled out).

PeterTimmers
Occasional Contributor III

Thanks.   I tried this in the early days of Survey123 and I thought this method didn't work.

Just tried it then and it worked.

0 Kudos