
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2025 02:42 AM
Hello Team,
I need help on reference qualifier.
I have created a custom field(Type) of reference type in the RITM table and I have created a custom table where i am storing the combination of Catalog item and type value.
So my requirement is to show the type based on catalog item.
If catalog item is Storage then only show story type value in the field it is working perfectly with dependent field.
But issue is coming when catalog Item type is not present in the custom table then we have created some default type that should show. That is not working properly.
Can you please help me on that?
Regards,
Alok Gupta
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2025 04:40 AM
try this
Also you should call it like this
javascript: 'sys_idIN' + new getValueforType().getType(current.variables.catVariableName);
var getValueforType = Class.create();
getValueforType.prototype = Object.extendsObject(AbstractAjaxProcessor, {
initialize: function() {},
getType: function(cat) {
gs.info("aloky" + cat);
var type = [];
var gr = new GlideRecord('u_category_choice_lookup');
gr.addQuery('u_item', cat);
gr.query();
while (gr.next()) {
type.push(gr.sys_id.toString());
}
if (type.length == 0)
return 'sysId'; // give here the sysId of default record
else
return type.toString();
},
type: 'getValueforType'
});
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2025 02:58 AM
Hi @Alok Gupta5
Can you please share the Reference Qualifier Logic?
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2025 03:01 AM
Hello Voona,
Please see the screen shot below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2025 03:29 AM
then you need scripting here to determine if there is any matching record found or not.
If match found then get all the records; if no match found then return 1 sysId
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2025 04:05 AM - edited 02-07-2025 04:06 AM
Hello @Ankur Bawiskar Ankur,
I have written a script include but not working let me know where to correct.