I have created a power table linked to a SQL DB.
This is for a checklist where the user will check if an action has been performed
At the end I have a button (Adherencia) to calculate the percentage of the actions performed.
But I keep getting this error:
This is the code I have setup for the button to count the checked boxes and then calculate percentage:
ds = event.source.parent.getComponent('Power Table').Checked
count = sum(ds.getValueAt(row, "Checked") for row in range(ds.rowCount))
event.source.parent.getComponent("Numeric Text Field 1").intValue = (count*100)/34
Any Idea what is wrong with the code?
Also if possible, is there a code to clear the check boxes with the same button?
Thank you in advance.