I am not getting correct answer through encoded query in glide record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 05:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 05:44 AM
Not able to get answer in client side
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 05:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 05:49 AM
yeah as i am testing using simple quries
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 05:55 AM
Try using addQuery instead of addEncodedQuery. I've pasted the code below.
function onLoad() {
var gr = new GlideRecord('cmdb_ci');
// ==============================
gr.addQuery('cost', '>', '10000');
// ==============================
gr.query();
var str;
var count=0;
while (gr.next()) {
str = str+ ' and ' + gr.name;
count++;
}
alert(str);
alert(count);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 05:56 AM
Hi,
You cannot use GlideRecord in Client script. Use GlideAjax and use GlideRecord code in Script include and call that script include using GlideAjax.
https://www.youtube.com/watch?v=KJy_d-3Kf7k
If this Answer is helpful then mark it as correct! ✅
