- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2020 07:54 AM
Hello All
I am running script include function and just notice that
this code lines sequence does not filter for active records
var gr = new GlideRecord(someTable);
gr.addActiveQuery();
gr.addEncodedQuery(strQuery); //
gr.query();
but this one does
var gr = new GlideRecord(someTable);
gr.addEncodedQuery(strQuery);
gr.addActiveQuery();
gr.query();
I could not find any docs regarding this
Does anyone have the same experience? Where could I read about it?
thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2020 08:43 AM
Does the encoded query contain an or condition? Or (multiple) layered and conditions?
Then it would matter if the active=true is at the beginning. Or at the end and then part of an or condition for example.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2024 04:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2024 07:25 PM
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2020 08:22 AM
Does your table have an 'active' field/flag? If not, the addActiveQuery does not work.
You have to add your own query to determine when the record is active.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2020 08:23 AM
yes, it does. I am quering pc_vendor_cat_item table.
sorry cannot share strQuery on internet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2020 08:43 AM
Does the encoded query contain an or condition? Or (multiple) layered and conditions?
Then it would matter if the active=true is at the beginning. Or at the end and then part of an or condition for example.