Conditional Groovy in a form comparing two accounts
Hello experts!!
I have a requeriment to do, I have this form:
And with Groovy I should get a validation in BALANCE row.
My requeriment is if BALANCE is equal to C1290_CALC then BALANCE cell should be green, else red.
Desired form:
I know how to do it just focusing in BALANCE if is 0 or different to 0, but is not usefull for me:
def greenColor = 0x00FF00 // Verde
def redColor = 0xFF0000 // Rojo
operation.grid.dataCellIterator('BALANCE').each { cell ->
if (cell.data < -1 || cell.data > 1) {
cell.bgColor = redColor
} else {
cell.bgColor = greenColor
}
}
So can I do comparing result between two rows?
Tagged:
0