- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2016 01:10 PM
Is there an easy way to convert an encoded query such as:
active=true^caller_id!=3643044b6ff851406b7283bc5d3ee42b^ORcaller_id=NULL
to make it look how it looks at the top of a ServiceNow list?
All > Active = true > Caller != Data Center Operations
For custom applications, allowing users to see a more readable version of their current filters would help tremendously. I'm just curious how ServiceNow does it for their own lists.
Solved! Go to Solution.
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2016 03:35 PM
When using a condition field, you can use the dictionary attribute readable=true, that way if someone has it displayed on a list or in a read-only field, it will still be readable.
For example: Active = true .and. Caller = Fred Luddy .or. Caller is empty
http://wiki.servicenow.com/index.php?title=Dictionary_Attributes#gsc.tab=0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2018 06:34 AM
Chuck,
Are there any exposed functions that can return the readable format on the server side? Use case is, if I'm using GlideFilter to check a record against a series of conditions, and I want to log/note the reason why it was excluded from the rest of the function, I'd like that to be in a readable format.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2018 06:49 AM
I've done some looking and experimenting, but I don't see anything. There must be a way because it's how the breadcrumbs are displayed, but I don't see any API that makes it available to the rest of the world. If I hear of anything, I'll be sure to post.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-12-2018 06:25 AM
I did some checking with our API team and came up with this. It only works in global. No word on a scoped version yet. I haven't tried the script include workaround yet.
I believe the two arguments are tablename and encoded query string (substitute with field values in this example.)
gs.info(new GlideQueryBreadcrumbs().getReadableQuery('incident','active=true^caller_id=46c9e158a9fe198101d44d0d22cb640d'));
*** Script: Active = true .and. Caller = Chuck Farley
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2019 05:49 AM
Thank you, this is definitely something to go on. I appreciate the help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2019 08:54 AM
Thanks man, I'm gonna need to check these things out