How to get encoded query display value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2020 02:43 AM
Hi Everyone,
I want to get date time fields display values so how can i get it in encoded query .
Example: opened on today
opened_atONToday@javascript:gs.beginningOfToday()@javascript:gs.endOfToday()
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2020 02:49 AM
Hi,
if you want to get the display value from Table API point of view then you need to set this parameter as true
sysparm_display_value = true
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2020 02:54 AM
Hi,
I need to achieve this in scripted rest api, i have added encoded query as well .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2020 03:17 AM
Hi,
So you will be getting this encoded query inside Scripted REST API.
Can you share the exact method how it would be received
What should be the response? which table you want to query with that query?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2020 03:55 AM
var table = 'table',
gr = new GlideRecord(table);
gr.addQuery('opened_atONToday@javascript:gs.beginningOfToday()@javascript:gs.endOfToday()');
gr.query();
while (gr.next()) {
var fields = {};
fields.Number = gr.number + '';
}
return fields;
