- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2024 11:20 AM
In Server side background script how to query glide record ... Sys Id is not ..
Below query is not working
var rec = incident.sys_id ( stored incident sysid records)
addQuery('sys_id , '!=', rec);
ANY IDEA
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2024 11:59 AM
Hi @sukran,
Use the following query instead:
addEncodedQuery('sys_idNOT IN'+rec);
I am assuming the 'rec' variable is an array which stores the sys_ids.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2024 12:06 PM - edited 03-26-2024 12:06 PM
Hi,
Refer the other's reply, you can update the addQuery() as below.
var rec = incident.sys_id ( stored incident sysid records)
addQuery('sys_id' , '!=', rec);
-Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2024 12:09 PM
And do post more of your script. Now we cannot assist in if you actually made a different error. What you shared now, should be fine. Though apparently its not 🙂
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field