- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2025 09:43 AM - edited 06-01-2025 09:46 AM
How to call system properties when I have 3 catalog item sys IDs and that needs to check whether it match to current catalog item sys id
Below is the query BR
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2025 11:23 AM
Hi @sukran ,
You can try this script.
var grp = gs.getProperty('testing_update').split(',');
// get sys_id of the current record
var sysId = RP.getParameterValue('sys_id');
for(var i=0;i<grp.length;i++){
if(grp[i]===sysId){
current.addInactiveQuery();
return;
}
}
current.addActiveQuery();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2025 10:10 AM
HI @sukran ,
Try this script
var grp = gs.getProperty('testing_update').split(',');
var url = gs.action.getGlideURI().toString(); // get URL of the record
gs.addInfoMessage(url);
for (var i = 0; i < grp.length; i++) {
if (url.includes(grp[i])) { // check URL contains property sys id
current.addInactiveQuery();
return;
}
}
current.addActiveQuery();
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-03-2025 01:10 AM
Hi @sukran ,
have you tried this script?
does it work?
if it works and is helpful could you please accept this as a solution too? as you can accept multiple responses as solutions
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-03-2025 01:22 AM
I tried using script and function gs.action.getGlideURL method , but the output is not as expected
and mainly in the service portal its not working
I tried below script as well but its working for platform view not in service portal
var query = gs.getUrlOnStack();
if (query) {
if(!query.includes(xxx)){
current.addActiveQuery();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2025 10:58 AM
You can simply fetch the sys_id of the current record using below syntax.
var sysID = RP.getParameterValue('sys_id');
Why creating System Property for simple URL query?