- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 05:42 AM
using this script include function in sla filter value (service.sys id is one of), when i am using manually var formatted = 'sys_id1,sys_id2'; it is working fine and when i am getting this from property, it's not working, any suggestions????
property value is same: sys_id1,sysid2
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 06:49 AM
gs.getProperty() has some issues when called from client callable script include
use GlideRecord to query sys_properties table with your name of property and then return the value
If my response helped please mark it correct and close the thread so that it benefits future readers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 06:20 AM
@Muhammad Salar there is a classic case of invisible characters or string format mismatch. verify the below code:
var prop = gs.getProperty('custom.excluded.services', '');
var formatted = prop.split(',').map(function(e) {
return e.trim();
}).join(',');
gs.info('[GetExcludedServices] Cleaned formatted value: ' + formatted);
return formatted;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 06:30 AM
i am using this script include in SLA start condition filter, this code is also not working unfortunately
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 06:25 AM
Hi @Muhammad Salar ,
Sometimes, there might be hidden characters or spaces in the property value.
**
var prop = gs.getProperty('custom.excluded.services', '').trim();
**
If this response has helped you and your concern is solved, then click on a "helpful", & "Accept as Solution".
Regards,
Mohd Arbaz.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 06:36 AM
Yes, i have tried these things, no luck