select_one no duplicate

677
2
Jump to solution
07-16-2020 10:24 PM
ReubenWilliams
New Contributor

Hi, I have 2 select_one questions in survey123 with the same list of choices (staff members), ${author} and ${reviewer}. I need to ensure that the choices are unique, or in other words the author cannot be the reviewer. I've tried various methods using the constraint field but unable to achieve the right outcome so far. How should I go about this?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JamesTedrick
Esri Esteemed Contributor

Hi Reuben,

The calculation for the constraint should be:

${author} != ${reviewer}

Note that this can only be applied to 1 of the 2 fields - applying them to both results in a circular calculation error (i.e., question 1 is dependent on question 2's values, which dependent on question 1, which is...)

View solution in original post

2 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Reuben,

The calculation for the constraint should be:

${author} != ${reviewer}

Note that this can only be applied to 1 of the 2 fields - applying them to both results in a circular calculation error (i.e., question 1 is dependent on question 2's values, which dependent on question 1, which is...)

ReubenWilliams
New Contributor

Thanks James, this works. I had tried previously but I didn't test properly as I expected the error instantly on match, when in reality the constraint is only tested when the form is submitted. 

0 Kudos