- 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
07-01-2025 02:37 AM
yes i am trying to get the Table names and records from those table should only show in CI field.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2025 02:40 AM
I believe I already answered your original question and subsequent questions.
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 08:03 AM
Hi @Nisha30 ,
try updating the script include script as
getTableNames: function(chkcategory) {
chkcategory = chkcategory.toString().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
07-01-2025 03:13 AM
tried above but not working. Is the Dictionary able to call the SI not sure.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2025 03:22 AM
did you compare correct category value?
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