I have a variable called numFiles, which I can print and verify contains an
integer.
Integer numFiles = vars.getObject("numFiles");
I want to make a random number between 0 and that value. But all of the
following fail
${__Random(0,__ ${numFiles},docIndex)};
Integer docIndex = ${__Random(0,${numFiles})};
${__Random(0,__ numFiles,docIndex)};
Integer docIndex = ${__Random(0,numFiles)};
All with an errors like:
Uncaught Exception java.lang.NumberFormatException: For input string:
"${NUMFILES}". See log file for details.
Uncaught Exception java.lang.NumberFormatException: For input string:
"numFiles". See log file for details.
How do I pass a variable into the random() function?
Thank you
David
This email, including attachments, may contain information that is privileged,
confidential or is exempt from disclosure under applicable law (including, but
not limited to, protected health information). It is not intended for
transmission to, or receipt by, any unauthorized persons. If the reader of this
message is not the intended recipient, or the employee or agent responsible for
delivering the message to the intended recipient, you are hereby notified that
any dissemination, distribution or copying of this communication is strictly
prohibited. If you believe this email was sent to you in error, do not read it.
Please notify the sender immediately informing them of the error and delete all
copies and attachments of the message from your system. Thank you.