- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2025 06:32 AM
Hi ,
we have set many system properties which contains table names comma separated.
Example: hard.ci.pop
1)need to call this property from Script Include
2) the result of this should be : 'Configuration Item' field should display records only from these tables.
How do I achieve this
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2025 04:23 AM
Hi @Nisha30 ,
in the question you have share the property screenshot value contains ";" at the end
remove the ";" at the end of the property value in the system property
update the ref qual as below
javascript: "sys_class_nameIN" + new global.getincTables().getTableNames(current.getValue('category'));
update/keep the script include method as below
getTableNames: function(chkcategory) {
chkcategory = chkcategory.toLowerCase();
if (chkcategory == 'hardware')
return gs.getProperty('inc.filter.hardware');
else if (chkcategory == 'software')
return gs.getProperty('inc.filter.software')
else if (chkcategory == 'exchange')
return gs.getProperty('inc.filter.exchange')
else
return ''
}
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2025 06:43 AM
I believe you have a reference field pointing to cmdb_ci parent table and want to see CIs only from these system property tables
If yes then use this in advanced ref qualifier of that reference field
javascript:"sys_class_nameIN" + gs.getProperty('hard.ci.pop');
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
06-30-2025 06:51 AM
Thank you for marking my response as helpful.
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
06-30-2025 06:53 AM
that seems a good idea, but we have many system properties and not just single.
so based on category different system properties will be there and hence there should be different table.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2025 07:10 AM
you can adjust it like this if category is a field on same form/table
something like this
If you have lot of categories to compare then create a script include function and call it from advanced ref qualifier and pass the category field value
javascript:var query; if(current.categoryField == 'value1') query = "sys_class_nameIN" + gs.getProperty('hard.ci.pop'); else if(current.categoryField == 'value2') query = "sys_class_nameIN" + gs.getProperty('property2'); query;
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