Query the sys_journal_field for additional comments with setLimit() method.

Maxwell3
Kilo Guru

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.

find_real_file.png

1 ACCEPTED SOLUTION

Elijah Aromola
Mega Sage

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!

View solution in original post

1 REPLY 1

Elijah Aromola
Mega Sage

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!