- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2024 01:33 PM - edited 07-18-2024 02:07 PM
Hello everyone,
I am currently learning how to develop UI pages on ServiceNow and have come across examples using tags like <j:if>, <j2:if>, <g:evaluate>, <g2:evaluate>, and <g3:evaluate>.
Can someone explain the differences between these tags? Are they related to different versions of ServiceNow or is there another reason for using these specific tags?
Thank you!
<g:evaluate var="result">${someExpression}</g:evaluate>
<j:if test="${someCondition}">
<!-- Code to execute if someCondition is true -->
</j:if>
<g2:evaluate var="result">${someExpression}</g2:evaluate>
<j2:if test="${someCondition}">
<!-- Code to execute if someCondition is true -->
</j2:if>
<g3:evaluate var="result">${someExpression}</g3:evaluate>
<j3:if test="${someCondition}">
<!-- Code to execute if someCondition is true -->
</j3:if>
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2024 03:51 PM
Hey @shannon1720 ,
I want to beat around the bush for some time here. 😉
The real power of jelly is that it provides you with custom solutions when conventional approaches don't work or when everything else has failed. Also, with UI Macro/UI Page and Jelly you could create entire worlds. (trust me, I've done it). Many of the backend stuff you see in SN is actually built on jelly!
But all of that used to be a big deal before Service Portal was released...
After Service Portal came into the scene, and with the Next Experience and Workspace already here, there is so very little to do with Jelly now (sigh). All the action is happening elsewhere. Only rarely you would have to open a UI Macro/UI Page to update jelly code. 2 examples below:
- The Case Creation (case_creation) page in HRSD application is a monster UI page that sometimes requires updates
- Clients asking to add additional functionality on popups (GlideDialogWindow) on a backend form may require jelly inspection
But chances are you may never ever need to use jelly for actual client work. Agreed that if and when you have to do so, you will go crazy trying to get it to work 😂... The point I'm trying to make here is don't be bothered with <g2:evaluate> and <g3:evaluate>. You only need the <g:evaluate> to do any jelly work.
Now if you are still curious, here are 2 resources to help you understand jelly better.
1. Common errors in UI Page / Macro
2. Jelly: It's a Crazy, Mixed-Up World...
The first page is my own, so I highly recommend reading through it, obviously...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2024 03:51 PM
Hey @shannon1720 ,
I want to beat around the bush for some time here. 😉
The real power of jelly is that it provides you with custom solutions when conventional approaches don't work or when everything else has failed. Also, with UI Macro/UI Page and Jelly you could create entire worlds. (trust me, I've done it). Many of the backend stuff you see in SN is actually built on jelly!
But all of that used to be a big deal before Service Portal was released...
After Service Portal came into the scene, and with the Next Experience and Workspace already here, there is so very little to do with Jelly now (sigh). All the action is happening elsewhere. Only rarely you would have to open a UI Macro/UI Page to update jelly code. 2 examples below:
- The Case Creation (case_creation) page in HRSD application is a monster UI page that sometimes requires updates
- Clients asking to add additional functionality on popups (GlideDialogWindow) on a backend form may require jelly inspection
But chances are you may never ever need to use jelly for actual client work. Agreed that if and when you have to do so, you will go crazy trying to get it to work 😂... The point I'm trying to make here is don't be bothered with <g2:evaluate> and <g3:evaluate>. You only need the <g:evaluate> to do any jelly work.
Now if you are still curious, here are 2 resources to help you understand jelly better.
1. Common errors in UI Page / Macro
2. Jelly: It's a Crazy, Mixed-Up World...
The first page is my own, so I highly recommend reading through it, obviously...