script include in the Reference Qualifier of a catalog variable lookup select box.

Jeff316
Kilo Guru

Hi All,

I think I need to use a script include in reference qualifier field on the catalog variable of a lookup select box.

We don't have any catalog variables to date that have done that, so I'm not sure the syntax in the script include and the ref qualifier field to return the results below. It's almost like I need an if/then/else in the ref qualifier field but I know I cannot do that.

 

I have a catalog variable where the user will select an “Environment” which could be Prod, test, uat, sand, play, other.

I have another Lookup Select Box variable called “Size” that pulls from the “Size” table with 2 columns “Desc” and “Env”. I want to use a reference qualifier on this menu to…

 Only return to the "Size" variable's menu the 2 “Desc” records where “Env=prod” if the Environment variable selected in the field above was “Prod” else return all 4 "Desc" into the "Size" variables's menu options.

 

Desc         Env

Large        prod

Medium   prod

Small        non-prod

Tiny           non-prod

1 ACCEPTED SOLUTION

Thanks for sharing the details. This was not working correctly because you had  ref_qual_elements=u_description defined under variable attribute section whereas it should be  ref_qual_elements=environment (environment is the reference variable name). I have updated it now and the lookup select box is now working fine as per your requirement.

 

-Pradeep Sharma

View solution in original post

12 REPLIES 12

Can't thank you enough Pradeep. I learned a lot.  This was my first catalog item where I needed to do this type of lookup. Plus the data for these tables is coming from an API import which is new for me as well. Enjoy the rest of your weekend. 

You are very welcome @user_316. Thanks for participating in the community!

 

Have a great weekend!

 

-Pradeep Sharma

Service_RNow
Mega Sage

HI,

Please follow the link it's helpful for you:

Reference Qualifier on Lookup Select Box Variable

 

Thanks