View Encoded Query in user friendly way?

David_Holmes
Tera Expert

Hi, I have a scenario where-by an encoded query is the value of a variable within a RITM:
find_real_file.png

So when it comes to approve this within our Service Portal, the user will see the query as so:

find_real_file.png

Is anyone aware of a way to get this query string to display in a more user friendly way on the service portal? Maybe something that looks like the condition builder? Failing that, anything to allow users to understand what they will be approving (if this makes sense).

1 ACCEPTED SOLUTION

David_Holmes
Tera Expert

Thanks everyone for your replies. If anyone is looking at this in the future, I managed to get it to work making use of this article: Replicate Conditions field type for Service Portal variables - Developer Community - Article - Servi...

Example below:
find_real_file.png

View solution in original post

4 REPLIES 4

Maik Skoddow
Tera Patron
Tera Patron

Hi

your scenario is a edge case without any OOTB solution. The only option I can see is reverse engineering the query string, for example replacing "^" with "AND" and load the records behind the Sys IDs to print the display name.

Kind regards
Maik

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

that's by platform OOB as mentioned by Maik.

Please inform your business team around this limitation.

You can try the approach shared by Maik but it would be somewhat tedious task.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

-O-
Kilo Patron
Kilo Patron

As they say in American movies:

don't listen to those who say you can't do it

🙂

Anyway, @Chuck Tomasi's solution might work for you too: How to get the display value of an encoded query?. You could use that API to copy the human readable condition into a 2nd variable and display that in portal.

David_Holmes
Tera Expert

Thanks everyone for your replies. If anyone is looking at this in the future, I managed to get it to work making use of this article: Replicate Conditions field type for Service Portal variables - Developer Community - Article - Servi...

Example below:
find_real_file.png