The CreatorCon Call for Content is officially open! Get started here.

Reference qualifier with catalog item on load

Khanna Ji
Tera Guru

Hi All,

I have a List selection variable which shows a list of fields from a custom table. In the custom table, I have a reference field to show catalog items.

Now, in the variable, I want to add a reference qualifier to show only those records which match the current catalog item.

I tried the method in the below thread but it just checking only one field. I have one more field on the custom table - active. This also needs to be considered in the filter.

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

I tried using a script including but unable to find how to get the current catalog item value. I even tried using a variable in which I am storing catalog item value when the form loads as described in the thread but its returning null. Maybe server-side scripts execute first and then client scripts.

 

6 REPLIES 6

Namrata Khabale
Giga Guru

Hey,

 

You can define your function in your script include to accept input, something like:

YourFunctionName: function(current) {}

And when you call the script include, pass current to the function. (In Reference Qualifier)

javascript: new YourScriptInclude().YourFunctionName(current);

 

Mark my answer Correct if it solves your issue and Helpful if you find response worthy!

 

Best Regards,

Namrata.

 

I have mentioned that I already tried script include but I am unable to fetch the current catalog item in script include.