- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2019 12:42 PM
Hello all,
I am querying the sys_journal_field table to obtain the "additional comments" and to print them on email notifications.
I am using the setLimit() method but no matter what number I enter in the parenthesis, I am only getting one entry to return. Is anyone familiar with the setLimit() method?
I have attached a snapshot of the script.
P.S: I know that I can just use the getJournalEntry() to return additional comments but querying the table offers more flexibility.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2019 12:43 PM
Change your "if" to a "while". Take a look at my explanation below.
if (gr.next()) {
// returns one result no matter how many it found
}
while(gr.next()) {
// returns any number of records from 0-however many it finds.
}
Please mark my answer as correct/helpful if it resolved your issue!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2019 12:43 PM
Change your "if" to a "while". Take a look at my explanation below.
if (gr.next()) {
// returns one result no matter how many it found
}
while(gr.next()) {
// returns any number of records from 0-however many it finds.
}
Please mark my answer as correct/helpful if it resolved your issue!