Validate answers based on previous values

721
2
Jump to solution
05-08-2018 08:28 AM
AndrewHargreaves2
Occasional Contributor III

Hi James Tedrick‌ / Ismael Chivite

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. 

Please can I ask your advice?

Thanks

0 Kudos
1 Solution

Accepted Solutions
JamesTedrick
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".

View solution in original post

2 Replies
JamesTedrick
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".

AndrewHargreaves2
Occasional Contributor III

Thanks James Tedrick‌! 

0 Kudos