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.
type | name | label | relevant |
begin group | fire | Fire | |
select_one yes_no | fire_present | Fire Protection? | |
select_one rating | fire_rating | Condition Rating | ${fire_present}='yes' and selected(${fca}='level 1' or ${fca}='level 2') |
text | fire_main_location | Location of water main | ${fire_present}='yes' and selected(${fca}='level 2' or ${fca}='level 3') |
text | fire_comments | Comments | ${fire_present}='yes' |
end group |
Solved! Go to Solution.
what about:
${fire_present}='yes' and (selected(${fca}, 'level 2') or selected(${fca},'level 3'))
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.
Actually, looking again, it could also be because you need to have the word "selected" for both ${fca} parts of the statement.
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')
what about:
${fire_present}='yes' and (selected(${fca}, 'level 2') or selected(${fca},'level 3'))
this was it! thanks for sharing your knowledge!