I am trying to change the row color of my vision table based on the value of the individual cells in my table. So for example, if orderno is equal to my tag value I want that row to change the color.
I wrote a cellEdited script on my table and I think this should work but it does not:
Consider doing as much as possible in project scripts, where you pass components and parameters to project functions. Either kind of event then becomes a one-liner (of different flavors) and you can maintain a single paradigm in the script library.
I have tried different scripts but none of them worked. This script should work but it does not. It always returns the color ‘yellow’ even though orderno is equal to my ordeno tag value.
data = self.data.getValueAt(rowIndex,"orderno")
if data == system.tag.readBlocking("[System]Client/orderno"):
return{'background': 'red'}
else:
return{'background': 'yellow'}