"if and" statements

578
1
Jump to solution
11-26-2021 08:32 AM
Direción_Metropolitana_deDesar
New Contributor

Hi everyone, I'm new using survey123 connect and I Want to know What  is wrong with this:

Direcin_Metropolitana_deDesar_1-1637944113217.png

 

Im trying to use "if and" statemtents, but when I save an error appears.

Im using 

if(${IC}<1 and {AIVA}<120, 0.17, "OTRO VALOR") and also I tried if((${IC}<1, 0.17) and ({AIVA}<120 ,0.17), 0.17, "OTRO VALOR"), but didnt work.

 

Thank You

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
IsmaelChivite
Esri Notable Contributor

Hi. You are missing $ in front of {AIVA}. The correct expression is: if(${IC}<1 and ${AIVA}<120, 0.17, "OTRO VALOR")

A few additional suggestions for the form design:

  • In row 11, you have a decimal question with a calculation that outputs a string ("OTRO VALOR"). This is not good. You cannot store text in a decimal question.
  • Rows 3 to 10 all share the same expression in the relevant column. This is not an issue in your form because it is small, but generally speaking you should consider grouping your questions and apply a relevant statement to the group, rather than every question. This will make your survey more efficient.

Hope it helps.

View solution in original post

1 Reply
IsmaelChivite
Esri Notable Contributor

Hi. You are missing $ in front of {AIVA}. The correct expression is: if(${IC}<1 and ${AIVA}<120, 0.17, "OTRO VALOR")

A few additional suggestions for the form design:

  • In row 11, you have a decimal question with a calculation that outputs a string ("OTRO VALOR"). This is not good. You cannot store text in a decimal question.
  • Rows 3 to 10 all share the same expression in the relevant column. This is not an issue in your form because it is small, but generally speaking you should consider grouping your questions and apply a relevant statement to the group, rather than every question. This will make your survey more efficient.

Hope it helps.