We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to convert the encoded query to readable one

Vijay27
Tera Guru

var gr = new GlideAggregate('sn_hr_core_task');
gr.addEncodedQuery("active=true^parent=" + current.parent); 
gr.addAggregate('COUNT');

3 REPLIES 3

Ankur Bawiskar
Tera Patron

Hi Vijay,

Can you explain in detail what is required?

Regards

Ankur

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

if we have a encode query like this

Query = "user=" + user + "^delegate=" + delegate + "^assignments=true^starts<=javascript:gs.endOfToday()";

 

How ca we decode and read it.actuall iam getting this query from the script,i want to know what it is ?

how can we read it so that we can understand the meaning of query like ezample :active is true 

 

In order to read encoded query, you need to know operators and fields names used in the encoded query.

 

https://docs.servicenow.com/bundle/london-platform-user-interface/page/use/using-lists/concept/c_EncodedQueryStrings.html

 

Regards,

sachin