conditional statement

102
1
Jump to solution
01-15-2021 03:48 PM
chiragtiwari
New Contributor II

Dear Colleagues, 

 

I have the following statement: 

 

if(selected(${item_on_path}, 'other_unsafe') or selected(${item_on_path}, 'dontknow') or selected(${item_uxo_on_path}, 'setonfire') or selected(${item_on_path}, 'takeithome') or selected(${item_uxo_on_path},'taketoauthorities') or selected(${item_on_path},'buryit') or selected(${item_uxo_on_path},'movetosafeplace'),0,1)


in this survey i have 3 age groups: 6-10, 11-17, and 18. I would like to change this conditional statement to have an "if" clause.  If ${age}='6-10' than (${item_on_path},'mark it'),0,1) as well.

any suggestions?

 

Tags (2)
Reply
0 Kudos
1 Solution

Accepted Solutions
Alber_Verster
Esri Contributor

Hi,

What is the exact problem here? Does your first statement not work or are you looking for advice on how to change it?

Regarding your second query, the provided logic does not satisfy the If-then-else conditional workflow.

You would expect something like this:

If(selected(${age}, '6-10') and selected(${item_on_path},'mark it'),0,1)

You could also have a look at the documentation on formulas provided by Esri here:

https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm

Hope this helps.

Alber

 

View solution in original post

Reply
0 Kudos
1 Reply
Alber_Verster
Esri Contributor

Hi,

What is the exact problem here? Does your first statement not work or are you looking for advice on how to change it?

Regarding your second query, the provided logic does not satisfy the If-then-else conditional workflow.

You would expect something like this:

If(selected(${age}, '6-10') and selected(${item_on_path},'mark it'),0,1)

You could also have a look at the documentation on formulas provided by Esri here:

https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm

Hope this helps.

Alber

 

View solution in original post

Reply
0 Kudos