How to remove an option in a list collector if another option in the same list collector is chosen?

Indigo Bailey
Tera Contributor

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.

4 REPLIES 4

Murthy Ch
Giga Sage

Hi @Indigo Bailey 

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:

MurthyCh_0-1668494681332.png

use below logic and replace with your record sys_id's:

javascript: if(current.variables.groups.indexOf("9a9a02431ba84950558d639bbc4bcb2c")>-1){ "sys_idNOT IN"+"63ba4ac31ba84950558d639bbc4bcbd7"};

MurthyCh_1-1668494734820.png

Hope it helps:)

 

 

Thanks,
Murthy

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: 

IndigoBailey_1-1668530701796.png

Thank you for your time,
Indigo

 

 

Hi @Indigo Bailey 

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)

 

Thanks,
Murthy

@Murthy Ch 

What if we have multiple conditions. Do we need to use script include.