IT CanvassTalk to an advisor
ServiceNow Cheat Sheets · LessonReviewed by Neelima, ServiceNow Architect · Updated · Published · current release · reference

ServiceNow Encoded query cheat sheet

Read and write encoded query strings with confidence.

Quick answer

An encoded query is the string form of a ServiceNow list filter. Conditions join with ^ for AND and ^OR for OR, ^EQ closes an OR group, and ^ORDERBY or ^ORDERBYDESC sorts. For example, active=true^priority=2^assigned_toISEMPTY^ORDERBYDESCsys_created_on reads as active priority 2 records with no assignee, newest first. Build the filter visually, then right-click the breadcrumb and Copy query.

Key takeaways
  • Operators
  • Logic
  • Example

Encoded queries are the string form of a filter. Build one visually, right-click the breadcrumb, and Copy query.

Operators

  • = equals, != not equals
  • > < >= <=
  • IN, STARTSWITH, ENDSWITH, LIKE

Logic

  • ^ = AND, ^OR = OR
  • ^EQ ends an OR group
  • ^ORDERBY / ^ORDERBYDESC

Example

active=true^priority<=2^assigned_toISEMPTY^ORDERBYDESC sys_created_on
Already working on ServiceNow and stuck on a live ticket?Get an expert ServiceNow developer on screen-share to finish your daily tasks with you. Deliver on time, protect your reputation and your job. Monthly support only, no task-wise plans.Task assigned · no idea where to startStill stuck · your job on the lineExpert joins your screenDelivered on timeExplore On Job Support