Survey123 - multiple relevant

8255
1
Jump to solution
06-07-2017 03:14 AM
AlBow
by
New Contributor

Hi,

I've a form like this:

  • CLASS Name
    • 1 - Electro
    • 2 - Macro
    • 3 - Plus
  • WASTE
    • 1 - Yes
    • 2 - No
    • 3 - Not sure
  • Material
    • 1 - Glass
    • 2 - Wood
    • 3 - Stone
    • 4 - PVC

I'm able to configure the Survey123 Sheet in order to make WASTE and Material fields visibles when I select items 2 or 3 from CLASS Name field (${class_name} > 1).

But the question is: can I also add a relevant to Material field to get it NOT visible when WASTE field selected item is No? I've tried to set relevant for Material field concatenating ${class_name} > 1 + ${waste_sel} = 'no' but it doesn't work.

Please, any help?

1 Solution

Accepted Solutions
MichaelKelly
Occasional Contributor III

Using the following should do the trick:

${class_name} > 1 and ${waste_sel} = 'no'

If you are referencing choice lists, you need to use the value that is in the name column (as opposed to the label column) as below:

So if the name that represents No is in fact the number 2, then your formula will look like this:

${class_name} > 1 and ${waste_sel} = 2

Using the int() formula might also be worthwhile to ensure the referenced value is always treated as an integer.

int(${class_name}) > 1 and int(${waste_sel}) = 2

You can check out the full list of operators in the documentation here.

View solution in original post

1 Reply
MichaelKelly
Occasional Contributor III

Using the following should do the trick:

${class_name} > 1 and ${waste_sel} = 'no'

If you are referencing choice lists, you need to use the value that is in the name column (as opposed to the label column) as below:

So if the name that represents No is in fact the number 2, then your formula will look like this:

${class_name} > 1 and ${waste_sel} = 2

Using the int() formula might also be worthwhile to ensure the referenced value is always treated as an integer.

int(${class_name}) > 1 and int(${waste_sel}) = 2

You can check out the full list of operators in the documentation here.