Hello
anyone for what is wrong with this equation in a survey123 Calculation column
if(${tonnage_pct}<5, if(${temps_transport}<240,'oui','non'))
Thanks
Hello Rene Aubut,
The parameters of the if() function are if(<condition>,<return X if condition is met>,<otherwise return Y>)
Please use this link for reference: Formulas—ArcGIS Survey123 | Documentation
In your condition are you trying to say if ${tonnage_pct}<5 AND ${tems_transport}<240 return 'oui' otherwise return 'non', or are you trying to say if ${tonnage_pct}<5 OR ${tems_transport}<240 return 'oui' otherwise return 'non'?
Thank you,
Zach
Thanks Zach. I need both conditions to return true. My difficulty with the IF syntax is when I have to check for more than one condition. With one condition it is straightforward.
I just tried without success
if(${tonnage_pct}<5 AND (${temps_transport}<240,'oui','non')
where tonnage_c is Decimal type and temps_transport is Integer
Well you have an extra ( in there now
if(${tonnage_pct}<5 AND (${temps_transport}<240,'oui','non')
should be
if(${tonnage_pct}<5 AND ${temps_transport}<240,'oui','non')
But if you want it to be oui if either is true then you need to use an or not an and.
Hope that helps