Hello I have a powertable that is connected to a dataset tag. The table shows all the data in the dataset, however I want the lines where zero appears to not appear. Besides this, I want the cells of a column to change when the value of another column is higher than the maximum limit. Could you give me a hint? Thank you
Some hints:
Thanks for you answer but still doesn’t work.
Here is my script:
if colName == 'T2T':
if (self.data.getValueAt(0,25)) < (self.data.getValueAt(0,26)):
return {'background': '250,2,191'}
the problem is that I can’t change the color of a single cell, the whole column changes color.
How I change the color of a single cell based on a result. Thanks.
It’s because you’re always comparing the same values: self.data.getValueAt(0,25)
always gets a value from row 0 and column 25.
You need to use the rowIndex
argument to get the value of the current row: self.data.getValueAt(rowIndex, 25)
Thanks for you answer.