Select to view content in your preferred language

Have fields show up for multiple relevant situations

442
5
Jump to solution
05-22-2023 12:09 PM
MelissaSalich
Occasional 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 Regular Contributor

what about:

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

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

View solution in original post

0 Kudos
5 Replies
Katie_Clark
MVP Regular Contributor

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


“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
Katie_Clark
MVP Regular Contributor

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

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
MelissaSalich
Occasional 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 Regular Contributor

what about:

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

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
MelissaSalich
Occasional Contributor

this was it! thanks for sharing your knowledge!

0 Kudos