# Validate answers based on previous values

168
2
05-08-2018 08:28 AM
Highlighted
Occasional Contributor III

I'm struggling to understand how to implement the following validation step:

If {TURNS} <> 0 then {FINALTORQUE} > 0

However, I'm not able to place a formula in the 'constraint' or 'validation' fields - only the calculation field. The only other option I can think of is to create a 'calculation' field and if these two sum to 0 then I show a warning. Sadly, though this doesn't force the user the enter a higher value.

Thanks

Tags (2)
1 Solution

Accepted Solutions
Highlighted
by Esri Esteemed Contributor

Hi Andrew,

Per Formulas—Survey123 for ArcGIS | ArcGIS , inequality is expressed using != , not <>.  It appears that you are implying that whatever value submitted is valid if the number of turns is 0; that would lead to an if() statement of:

if(\${turns} != 0, (. > 0), true())

for the constraint of the finaltorque question - "if the number of turns is not equal to zero, then check if this value is greater than zero; otherwise, any value is fine".

2 Replies
Highlighted
by Esri Esteemed Contributor

Hi Andrew,

Per Formulas—Survey123 for ArcGIS | ArcGIS , inequality is expressed using != , not <>.  It appears that you are implying that whatever value submitted is valid if the number of turns is 0; that would lead to an if() statement of:

if(\${turns} != 0, (. > 0), true())

for the constraint of the finaltorque question - "if the number of turns is not equal to zero, then check if this value is greater than zero; otherwise, any value is fine".

Highlighted
Occasional Contributor III

Thanks James Tedrick‌! 