- 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 03:41 AM
Hi @Nisha30
You should put the gs.info message before the return statement
move all the gs.info statements before to return statements
is the choice value correct the backend value?
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 04:02 AM
yes the logs shows all property values however in incident form the CI field does not reflect records
Thanks
- 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 04:55 AM - edited 07-01-2025 04:59 AM
yes now it displays removing the semicolon from system properties.
Thanks all of very much your support in troubleshooting and resolving.
Thanks