Constraint if statement with two select multiple questions

703
5
Jump to solution
03-17-2022 02:48 PM
BradenWarns
New Contributor III

Hello,

I am having trouble with creating an IF statement with two select multiple questions in the constraint field.

Here is what I need to happen:20220316_141750.jpg

 

Here is what I have for the if statement:

if(selected(${extrarequest}, 'Extra_96g_Garbage'), 'One_time_fee' and 'Monthly_fee',
if(selected(${extrarequest}, 'Extra_96g_Recycle'), 'No_fee',
if(selected(${extrarequest}, 'Extra_96g_Garbage') and selected(${extrarequest}, 'Extra_96g_Recycle'), 'One_time_fee' and 'Monthly_fee' and 'No_fee',
'Remove_Recycle')))

I don't get any errors however, the constraint is not wrong correctly. I am sure I am missing something.

Any help would be greatly appreciated! @JamesTedrick    

 

0 Kudos
1 Solution

Accepted Solutions
BradenWarns
New Contributor III

I decided to change this section. I broke up the second multiple questions into single questions. Then used a simple selected function in the relevant field. Much easier to work with. Thanks for your help @Katie_Clark

View solution in original post

0 Kudos
5 Replies
Katie_Clark
MVP Regular Contributor

So, I'm not completely sure without testing it myself, but I believe select_multiple questions store the answer as a string, separated by commas. So instead of 'One_time_fee' and 'Monthly_fee', it would be 'One_time_fee, Monthly_fee'.

Best,
Katie


“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
0 Kudos
BradenWarns
New Contributor III

I tried your suggestion. I did not get an error, but it still is not functioning correctly. Thanks.

0 Kudos
Katie_Clark
MVP Regular Contributor

Would you be able to share your XLS form? 

Best,
Katie


“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
0 Kudos
BradenWarns
New Contributor III

I decided to change this section. I broke up the second multiple questions into single questions. Then used a simple selected function in the relevant field. Much easier to work with. Thanks for your help @Katie_Clark

0 Kudos
Katie_Clark
MVP Regular Contributor

Happy to hear you found a workaround! 

Best,
Katie


“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
0 Kudos