Lookup Select Box Variable based on other variable set by script

Community Alums
Not applicable

Hello

I've created a variable set with two variables: one is a select box 'Site', the other one is a lookup select box 'Warehouse' displaying values based on the 'Site' selection. This variable set is attached to several catalog items and this works fine on console and portal.

However, I have a case on a catalog item where the site should not be selected by the user. For that item, I've created an onLoad catalog client script that set the default value for 'Site', together with a catalog UI Policy that set the 'Site' field to read-only.

When requesting this item thru the console, it works fine: the list in the 'Warehouse' field is populated depending on the 'Site' value. However, this is not working on the portal. The default value is set for 'Site' but it seems it is not taken into account in the lookup select box.

Any idea is welcome!

Thank you in advance

 

 

 

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Thank you for your help.

 

Actually, changing the variable type from lookup select box to reference, with the same reference qualifier does the trick

View solution in original post

5 REPLIES 5

Harsh Vardhan
Giga Patron

can you please confirm on below points ?

 

 

the list in the 'Warehouse' field is populated depending on the 'Site' value

 

Q, Have you written client script to populate this ? if yes can you please confirm the client script UI Type set as ALL?

Community Alums
Not applicable

Yes, UI type in catalog client script is set to ALL

 

 

can you paste your script ?

Kajal Goti
Mega Guru

Hello,

You can this through catalog client script and script include.

For code and more information visit below link.

https://community.servicenow.com/community?id=community_question&sys_id=c71ccf25db9cdbc01dcaf3231f96...

Please mark as Correct and Helpful if you find any help.