Select to view content in your preferred language

Have fields show up for multiple relevant situations

919
5
Jump to solution
05-22-2023 12:09 PM
MelissaSalich
Frequent Contributor

In S123 connect I'm designing a form where I have a group that will need to have certain questions answered based on the level of survey being conducted. 

Level of survey is select_one level, required (level 1, level 2, level 3 are the pick list options)

Condition Rating needs to be filled out for every level of the survey.

How do I formulate the relevant field to show up for multiple select_one questions?

Below is what I've tried but it is not working. 

typenamelabelrelevant
begin groupfireFire 
select_one yes_nofire_presentFire Protection? 
select_one ratingfire_ratingCondition Rating

${fire_present}='yes' and selected(${fca}='level 1' or ${fca}='level 2')

textfire_main_locationLocation of water main${fire_present}='yes' and selected(${fca}='level 2' or ${fca}='level 3') 
textfire_commentsComments ${fire_present}='yes'
end group   
0 Kudos
1 Solution

Accepted Solutions
Katie_Clark
MVP Alum

what about:

${fire_present}='yes' and (selected(${fca}, 'level 2') or selected(${fca},'level 3'))

Best,
Katie

If this answer helped you, please consider giving a kudos and/or marking as the accepted solution. Thanks!

View solution in original post

0 Kudos
5 Replies
Katie_Clark
MVP Alum

Since you're combining "and" and "or" statements, seems like you'll need some parentheses in there to make it work properly. Right now the grouping isn't clear.

Best,
Katie

If this answer helped you, please consider giving a kudos and/or marking as the accepted solution. Thanks!
0 Kudos
Katie_Clark
MVP Alum

Actually, looking again, it could also be because you need to have the word "selected" for both ${fca} parts of the statement.

Best,
Katie

If this answer helped you, please consider giving a kudos and/or marking as the accepted solution. Thanks!
0 Kudos
MelissaSalich
Frequent Contributor

I updated the post with the grouping.
I'm still not successful after trying:

${fire_present}='yes' and selected(${fca}='level 2') or selected(${fca}='level 3')

selected(${fire_present}='yes') and selected(${fca}='level 2') or selected(${fca}='level 3')

0 Kudos
Katie_Clark
MVP Alum

what about:

${fire_present}='yes' and (selected(${fca}, 'level 2') or selected(${fca},'level 3'))

Best,
Katie

If this answer helped you, please consider giving a kudos and/or marking as the accepted solution. Thanks!
0 Kudos
MelissaSalich
Frequent Contributor

this was it! thanks for sharing your knowledge!

0 Kudos