Select to view content in your preferred language

Hiding select multiple options based on selection

2063
2
Jump to solution
11-12-2021 11:16 AM
VH_MapS
Occasional Contributor

Hello,

I have the select multiple question below:
Screenshot 2021-11-12 141216.jpg

I would like all of the other choices to disappear if the first option (No Equipment Present) is selected. 

I've tried a few different statements in the 'relevant' column (each select one choice generates a repeat) but I'm not having any luck.

Example Statement: if(selected(${Item_Type}, 'Capacitor') and not(selected{${Item_Type}, "NoEquipment")

Can someone point me in the right direction here?

1 Solution

Accepted Solutions
Hussam_AlJabri
Frequent Contributor

Hey @VH_MapS 

 

You have many options:

1- Create separate Select_One  question for the equipment availability:

Q\ Equipment Availability:

- Equipment Present
- No Equipment Present

Then use the relevant to hide or appear the next question about the equipment typ.

Hussam_AlJabri_0-1636917252467.png

 

Hussam_AlJabri_1-1636917043428.gif

 

2- you can use constraint to prevent user from selecting other choices if he selected "No Equipment Present" in same choice list:

if((selected(.,'cpacitor') or selected(.,'regulator') or selected(.,'transformer') or selected(.,'switch') or selected(.,'recloser') or selected(.,'fuse') or selected(.,'meter')or selected(.,'light')or selected(.,'underground_equipment')),not(selected(.,'NoEquipment')),selected(.,'NoEquipment'))

Hussam_AlJabri_0-1636916724467.png

Loom _ Free Screen  Video Recording Software.gif

View solution in original post

2 Replies
Hussam_AlJabri
Frequent Contributor

Hey @VH_MapS 

 

You have many options:

1- Create separate Select_One  question for the equipment availability:

Q\ Equipment Availability:

- Equipment Present
- No Equipment Present

Then use the relevant to hide or appear the next question about the equipment typ.

Hussam_AlJabri_0-1636917252467.png

 

Hussam_AlJabri_1-1636917043428.gif

 

2- you can use constraint to prevent user from selecting other choices if he selected "No Equipment Present" in same choice list:

if((selected(.,'cpacitor') or selected(.,'regulator') or selected(.,'transformer') or selected(.,'switch') or selected(.,'recloser') or selected(.,'fuse') or selected(.,'meter')or selected(.,'light')or selected(.,'underground_equipment')),not(selected(.,'NoEquipment')),selected(.,'NoEquipment'))

Hussam_AlJabri_0-1636916724467.png

Loom _ Free Screen  Video Recording Software.gif

VH_MapS
Occasional Contributor

Thank You for the quick reply!

I used the second suggestion. The constraint worked out great!