ServiceNow UI pages, macros & Jelly
The classic templating layer behind custom pages, formatters and legacy UI.
UI pages, UI macros and Jelly are ServiceNow's original server-side templating tools. Jelly is XML that mixes markup with logic and is evaluated on the server in two phases, marked $[ ] and ${ }, to produce HTML. New UI belongs on the modern stack, but formatters, custom modals and legacy pages still need you to read Jelly.
- The pieces
- Two evaluation phases
- When you still need it
- Try it Yourself
The classic templating layer behind custom pages, formatters and legacy UI.
UI pages, UI macros and Jelly are ServiceNow's original server-side templating tools. Jelly is an XML syntax that mixes markup with logic and evaluates on the server to produce HTML. You still meet it in formatters, custom modals, and older customisations, so a working knowledge is essential even in a low-code era.
The pieces
- UI page, a standalone page (HTML, a client script, and processing script).
- UI macro, a reusable Jelly snippet embedded in forms, lists and pages.
- Jelly, the
<j:jelly>XML that runs the logic.
Two evaluation phases
$[ ] (phase 1, first) then ${ } (phase 2). Mixing them up is the number-one Jelly bug. When you can, prefer a modern widget or UI Builder instead of new Jelly.When you still need it
Custom form formatters, some email layouts, and extending legacy UI16 pages still rely on UI macros. Learn to read Jelly; write new UI on the modern stack.
▸ Press Run to execute.
Runs in a sandbox in your browser. Mock gs and GlideRecord and sample data are provided.