How to add a filter to a LookUp Select Box variable Catalog item

rochelleefernan
Tera Contributor

Help to write a script - 
Where to write the script will be as under Variable attributes or Reference qual or create a Catalog Client script
If answer to question- Need access to a research lab is Yes, show Room Location country USA state is CA

find_real_file.png

 

Thanks

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

Try passing below as Reference qualifier

javascript: var query = ''; if(current.variables.variable_name == 'Yes') query = 'country=USA^state=CA'; query;

//replace variable_name with room location variable name

View solution in original post

3 REPLIES 3

suvro
Mega Sage
Mega Sage

You can use the reference qualifier to set a filter

find_real_file.png

You can write a client script onChange of  Need access to a research lab. 

But I would suggest having two lookup select box one with filter other without filter. If answer is Yes display the filter one otherwise display without filter one using UI policy

Jaspal Singh
Mega Patron
Mega Patron

Try passing below as Reference qualifier

javascript: var query = ''; if(current.variables.variable_name == 'Yes') query = 'country=USA^state=CA'; query;

//replace variable_name with room location variable name