Form Validation using groovy
Hi,
I am trying to match two separate set of columns using groovy. (Yellow should match with Green section - the Green section is dynamic). If it's not match script should not allow save (before save) and throw exception.
Below code gives total of all columns for each employee, but i am looking to get sum of specific columns only to compare.
Cube cube = currentRule.getCube()
List<DataGrid.Row> editedRows = operation.grid.rows.findAll{it.data.any{it.edited}}
editedRows.each { DataGrid.Row row ->
println row.data
println row.data*.data.sum()
}
Any help will be appreciated. Thanks in advance.
Tagged:
0