How to remove an option in a list collector if another option in the same list collector is chosen?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2022 04:25 PM
Hello! I've ran into a problem while trying to create a catalog item. I need to hide options in a custom list collector (made using the multiple choice to list collector method) based on if someone chose another option in the same list collector.
For example, if someone chose to get Color Line - Read Only access, then the Color Line - Update access option would disappear.
Please let me know if this is possible! Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2022 10:45 PM
I have implemented your scenario by taking groups table as an example in my instance. I am hiding the groupB record if I select groupA in list collector field.
See below image for your reference:
use below logic and replace with your record sys_id's:
javascript: if(current.variables.groups.indexOf("9a9a02431ba84950558d639bbc4bcb2c")>-1){ "sys_idNOT IN"+"63ba4ac31ba84950558d639bbc4bcbd7"};
Hope it helps:)
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2022 08:45 AM
Hi, Murthy!
It would help if I was using a normal table for my list collector, however I already have this as my reference qualifier:
Thank you for your time,
Indigo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2022 09:30 AM
That's not a issue we can use the AND condition and add the new filter.
javascript: if(current.variables.groups.indexOf("9a9a02431ba84950558d639bbc4bcb2c")>-1){ "sys_idNOT IN"+"63ba4ac31ba84950558d639bbc4bcbd7"+"^emailISNOTEMPTY"} else {"emailISNOTEMPTY"};
//here emailISNOTEMPTY with your existing filter...
Hope it helps:)
(=tested in my PDI)
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2023 05:13 AM - edited ‎07-14-2023 05:15 AM
What if we have multiple conditions. Do we need to use script include.