how to use for and while loop in jelly tag?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2014 05:48 AM
i want to use this for loop inside a jelly tag.......
<g:evaluate>
var counter=12;
var PageCount=50
</g:evaluate>
<j:while test="${counter lt; PageCount}">
..................................................
this is not working...... any idea??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2015 10:33 AM
What are you looping through? Is this script complete? In order to loop, you need to have something to loop through and not just a static number. Is your while test supposed to be an "and" statement? If so, you should be using && instead of lt;. The other issues I see is a missing semicolon on your PageCount javascript.
I can try to help with more information if needed; however the following pages are extremely helpful.
Extensions to Jelly Syntax - ServiceNow Wiki
TechNow Episode 1 | ServiceNow Jelly Scripting Part 1 of 3 - YouTube