ServiceNow Script Editor

Write real GlideRecord and GlideAggregate scripts and run them on realistic practice data: incidents, problems, changes, knowledge articles, users and groups.

Pick a question, let the editor ask you one at random, or use the free sandbox to try any script. No PDI needed, and the data resets on every run.

Job Switch Kit: Everything you need to crack your next ServiceNow interview Get Job Switch Kit →
Get the complete ServiceNow interview prep system — 500+ Q&A, mock interviews & more Get Job Switch Kit →
📘 Supported APIs and methods Tap to see what you can use in the practice editor

Scripts run as server-side background scripts, written in plain JavaScript the way ServiceNow expects (var, functions, arrays, JSON, Math). Press Ctrl+Space in the editor for suggestions.

GlideRecord also GlideRecordSecure

Query: addQuery, addEncodedQuery, addActiveQuery, addInactiveQuery, addNullQuery, addNotNullQuery, orderBy, orderByDesc, setLimit, getEncodedQuery, query, next, hasNext, get, getRowCount

Read: getValue, getDisplayValue, getUniqueValue, getTableName, getRecordClassName, isValid, isValidRecord, isNewRecord, isValidField, getLimit, getLastErrorMessage

Write: initialize, newRecord, setValue, setDisplayValue, insert, update, updateMultiple, deleteRecord, deleteMultiple, setWorkflow, autoSysFields, setForceUpdate, setUseEngines, setNewGuidValue

Security: canRead, canWrite, canCreate, canDelete

Or conditions: var qc = gr.addQuery(...); qc.addOrCondition(...)

GlideAggregate

addAggregate, getAggregate, groupBy, setGroup, orderByAggregate, addHaving, plus the GlideRecord query methods

Aggregates: COUNT, SUM, MIN, MAX, AVG

Fields gr.field, dot-walking

getValue, getDisplayValue, nil, getName, getLabel, getTableName, getReferenceTable, getRefRecord, setValue, changes, changesTo, changesFrom. Dot-walk references: gr.caller_id.email

gs

Logging: info, warn, error, debug, print, log, addInfoMessage, addErrorMessage

User and system: getUserID, getUserName, getUserDisplayName, hasRole, getProperty, setProperty, getMessage, nil, eventQueue

Dates: now, nowDateTime, nowNoTZ, daysAgo, daysAgoStart, daysAgoEnd, hoursAgo, minutesAgo, monthsAgo, beginningOfToday, endOfToday, beginningOfYesterday, beginningOfThisMonth, beginningOfLast7Days, beginningOfLast30Days, beginningOfThisYear, dateDiff and more

GlideDateTime and GlideDuration

GlideDateTime: getValue, getDisplayValue, setValue, getNumericValue, isValid, addSeconds, add, addDaysUTC / addDaysLocalTime, addWeeksUTC, addMonthsUTC, addYearsUTC, compareTo, before, after, onOrBefore, onOrAfter, equals, getDate, getLocalDate, getYearUTC, getMonthUTC, getDayOfMonthUTC, getDayOfWeekUTC

GlideDuration: getValue, getDisplayValue, getNumericValue, getDayPart, getRoundedDayPart

Query operators

= != < <= > >= IN, NOT IN, LIKE, NOTLIKE, STARTSWITH, ENDSWITH, ISEMPTY, ISNOTEMPTY, ANYTHING, ON, NOTON, and javascript:gs.daysAgoStart(7) style date values in encoded queries

Not available in the practice editor: chooseWindow, addJoinQuery, applyEncodedQuery, getLink, setAbortAction, getElements, gs.getSession, setting a field with field.setDisplayValue() (use gr.setDisplayValue('field', value) instead), Script Includes, GlideAjax and client-side APIs (g_form, g_user).

Ask me a question

While you're deciding, someone else applying for the same role already started their 15-day plan.

No countdown, no gimmick, just a head start you can still catch up on.

500+ Q&A — Technical + Behavioral, structured by module
15-Day Structured Roadmap — Day-by-day plan that peaks on interview day
Unlimited Interview Bot — Practice live, every session recorded and reviewable
Scripting Editor + Mock Round: Run real scripts, then a timed scripting round with interviewer review
Salary Negotiation Playbook — Counter-offers, CTC decoding, in-hand strategy
Job Switch Strategy Guide — Notice period, BGV, resignation, offer comparison
Progress Tracker + Notes — Always know exactly what to tackle next
LinkedIn Profile Optimisation — Get found by recruiters before you even apply
Catch Up →

🔒 Secure payment via Razorpay · Instant access after payment