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:24 AM
Hi @Murtaza Saify ,
There is a syntax error in your code, use addEncodedQuery instead of getEncodedQuery.
Corrected code:
function onLoad() {
var gr = new GlideRecord('cmdb_ci');
gr.addEncodedQuery('cost>10000');
gr.query();
var str;
var count=0;
while (gr.next()) {
str = str+ ' and ' + gr.name;
count++;
}
alert(str);
alert(count);
}
If you find my response helpful, please consider marking it as the 'Accepted Solution' and giving it a 'Helpful' rating. Your feedback not only supports the community but also encourages me to continue providing valuable assistance.
Thanks,
Amitoj Wadhera
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 05:43 AM
Not able to get answer as I am trying to use it in client side
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 05:32 AM - edited 06-04-2024 05:44 AM
Hi @Murtaza Saify ,
Glide record will not work on client script
I hope this helps...
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 05:43 AM
thanks for it but it is not giving me answer in client side