Showing choices dependent on choices in previous field - Advanced Reference Qualifier

Matki
Tera Contributor

Hello community,

I am facing following problem:

find_real_file.png

When the user clicks on Should the item only be available for IT employees > No, a new question shows up (Choose the main category under which the item should be available in the service catalog). Now, the user can choose different options (Hardware, Software....).

Depending on the selected category, the user should be offered different choices in the field  Please choose a sub category if needed. For example, when he clicks on Hardware he should only be able to see Monitor. When he clicks on Software he only should be able see New Software. I tried to implement this with an advanced reference qualifier

javascript:'active=true^sc_catalog=e0d08b13c3330100c8b837659bba8fb4^parentLIKE'+current.getValue('main_category_service_catalog');

find_real_file.png

But at the moment the restriction does not work and the user can see all options:

find_real_file.png

Any idea why this wouldn't work or how I could fix this?

 

 

1 ACCEPTED SOLUTION

suvro
Mega Sage
Mega Sage

Also try

 

javascript:'active=true^dependent_value='+current.variables.main_category_service_catalog;

View solution in original post

5 REPLIES 5

Aman Kumar S
Kilo Patron

Hey,

If you are doing this on a variable in catalog item, instead of using current.getValue(), try using as below:

javascript:'active=true^sc_catalog=e0d08b13c3330100c8b837659bba8fb4^parent='+current.variables.main_category_service_catalog;

 

Would not suggest using like:

There is no official support for a LIKE/CONTAINS condition.

To have the widest set of options with filtering lists, glide queries or running reports it is advisable to only link the tables based on sys_id references where possible using the = operator giving you the raw dataset to work width.

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar

Hey,

thanks for your help 🙂

Unfortunately, then comes the message "no matches found"

find_real_file.png

 

Use below

 

javascript:'active=true^sc_catalog=e0d08b13c3330100c8b837659bba8fb4^dependent_value='+current.variables.main_category_service_catalog;

Also try

 

javascript:'active=true^dependent_value='+current.variables.main_category_service_catalog;