- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2025 06:59 AM
Hi All,
I have created a system properties "a_b_c" where i have stored three sys ids of a catalog in form of a,b,c.
now this i have to use in business rule. when my catalog is any of this (a or b or c). then do xyz.
i have to put this sys property a_b_c in Encoded Query of a BR.
i have used but its not selecting that three catalog ids.
script:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2025 05:44 PM
Hi @PawanKumarR
Try below script..
var sysIds = gs.getProperty('a_b_c').toString();
var encodedQuery = 'cat_itemIN' + sysIds;
var ritmGr = new GlideRecord('sc_req_item');
ritmGr.addQuery("opened_by", current.getValue('u_owner_id'));
ritmGr.addEncodedQuery(encodedQuery);
ritmGr.addActiveQuery();
ritmGr.query();
while (ritmGr.next()) {
//YOUR LOGIC HERE
}
Hope this helps .
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2025 05:44 PM
Hi @PawanKumarR
Try below script..
var sysIds = gs.getProperty('a_b_c').toString();
var encodedQuery = 'cat_itemIN' + sysIds;
var ritmGr = new GlideRecord('sc_req_item');
ritmGr.addQuery("opened_by", current.getValue('u_owner_id'));
ritmGr.addEncodedQuery(encodedQuery);
ritmGr.addActiveQuery();
ritmGr.query();
while (ritmGr.next()) {
//YOUR LOGIC HERE
}
Hope this helps .
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2025 01:56 AM
Partially working for only one sys id, not working for other two
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 05:24 PM
This should work. I just tested this in my PDI.
1. Check if the sys_ids stored in the system property are valid.
2. Check if the BR is getting triggered or not using script tracer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2025 05:15 AM
Its working for only one sys id