Greetings
I am new to Ignition and I am working on a project using a Power Table to create a checklist
What I am looking for is to count how many “True” values ( or checked check boxes) there are in the Power Table, I do not need to save the values, just show the number and have a “Reset” Button to clear the checked after obtaining the number
Or to use it as a binding.
Create a custom property on the table named Checked as an Integer.
Then under scripting on the the table, under OnCellEdited
import system
if colName=='checked':
cDS = system.dataset.toPyDataSet(self.data)
if oldValue==1:
c=-1
else:
c=1
for r in cDS:
if r['checked']==True:
c+=1
else:
pass
self.Checked=c
Then bind the numeric label value to the tables Checked custom property.
If the datatype of the checked column can be int, you can use the sum expression function.
To show the int value as a checbox, check the Boolean? column in the table customizer.