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

How to Pass Multiple Parameters in Business Rule using Groovy Script

Summary:


We have written this Business Rule and we want to Update the Status Field based on three parameters peno, pperiod and ptype.


def vo = newView('Employee')

addBindVariable(vo,'EMPLOYEE_NNUMBER','Text')

setBindVariable(vo,'EMPLOYEE_NUMBER',peno)

vo.appendViewCriteria("EMPLOYEE_NUMBER = :EMPLOYEE_NUMBER")

addBindVariable(vo,'PERIOD','Text')

setBindVariable(vo,'PERIOD',pperiod)

vo.appendViewCriteria("PERIOD = :PERIOD")

addBindVariable(vo,'TYPE','Text')

setBindVariable(vo,'TYPE',ptype)

vo.appendViewCriteria("TYPE = :TYPE")

vo.executeQuery()

while (vo.hasNext()) {

 def r = vo.next();

 r.Status = pstatus;

}


Please advise.

Content (please ensure you mask any confidential information):


Version (include the version you are using, if applicable):


Code Snippet (add any code snippets that support your topic, if applicable):

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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