Skip to main content

Posts

Showing posts from June, 2025

Reverse engineering ServiceNow encoded queries

 useful link: https://www.servicenow.com/community/developer-blog/decoding-encoded-queries/ba-p/2290638 Encoded Query active=true^short_descriptionLIKEIssue^ORshort_descriptionLIKEProblem^NQactive=false^close_code=Not Solved (Not Reproducible)^RLQUERYtask_ci.task,>=1,m2m^ci_item.assignment_groupNSAMEASchange_control^ENDRLQUERY active=true ^ short_descriptionLIKEIssue ^OR short_descriptionLIKEProblem ^NQ active=false ^ close_code=Not Solved (Not Reproducible) ^RLQUERY task_ci.task,>=1,m2m^ci_item.assignment_groupNSAMEASchange_control ^ENDRLQUERY Converting to Code ^ =  AND // active=true var gr = new GlideRecord ( 'incident' ) ; gr . addQuery ( 'active' , 'true' ) ; // Alternative 1 gr . addCondition ( 'active' , 'true' ) ; // Alternative 2 gr . addActiveQuery ( ) ; ^OR =  OR //active=true^short_descriptionLIKEIssue^ORshort_descriptionLIKEProblem var qc = gr . addQuery ( 'active' , true ) ; qc . addOrCondtion ( 'sh...