You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

my groovy script returns only one row

Accepted answer
11
Views
1
Comments

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.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!