my groovy script returns only one row
Summary:
Content (required):
Hi Experts,
I used this discussion to re-write the script in different way:
Return List of Rows by Groovy — Cloud Customer Connect (oracle.com)
This is my script:
def vo = newView('MY_BO')
def myRequest = MY_INPUT
addBindVariable(vo,'requestNumber','Text')
setBindVariable(vo,'requestNumber',myRequest)
vo.appendViewCriteria("requestNumber = ${myRequest}");
vo.executeQuery();
def map = [:];
while(vo.hasNext()) {
def row = vo.next()
map.put(row.requestNumber,[row.id,row.Number,row.status])
}
return map;
myRequest has two rows but when I test it, returns only the last row.
when I run it without filtering it returns all the rows in my BO.
Tagged:
0