- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2017 09:29 AM
I have a GlideRecord query that looks something like this:
var ka = new GlideRecord('x_81991_knowledge');
ka.addQuery('workflow_state', 'Published');
ka.addQuery('kb_category.label', 'Benefits');
var qry = "seriesLIKE"+occ+"^NQlocationLIKE"+loc+"^NQseriesISEMPTY^locationISEMPTY";
ka.addEncodedQuery(qry);
I've noticed that the Encoded query and the regular addQuery dont' seem to work together. For instance in the above query, I would expect the list of knowledge articles to be filtered to only Published articles, and with category Benefits, and then by series/location in the encoded query. However, it seems like the encoded query doesn't take into account the other addquery. This still returns article regardless of category...
Any suggestions?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2017 10:44 AM
Thanks Patrick and sherrysullivan, I actually got the query to work by simply moving the addEncodedQuery line above all of my addQuery lines. I'm not sure why the order matters, but that solved the issue. If you have any insights as to why this worked, I would love to learn about it. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2024 06:45 PM
Attempted to confirm / answer this, here: