Programming help in power table

Hello All,

On the power table above, how do I get the green highlight to turn red if its not on the same row as the blue. I have 4 custom property binding to tags. In general Blue Highlights the expected part, if the correct part is detected the green is supposed to highlight the cell in the same row as the expected part, and if any other part is detected its supposed to be highlighted in red.

Currently I am using this script


attributes = {'background': 'White', 'foreground': 'Black'}
	if colName == "Seed Tube Part Number" and value == self.PartNumber:
      	  attributes['background'] =  'Blue'
      	  attributes['foreground'] = 'White'
	if colName == "Program Number" and value == self.CurrentProgramNumber and self.Pass == True:
        	attributes['background'] =  'Green'
      		attributes['foreground'] = 'white'
	if colName == "Program Number" and value == self.CurrentProgramNumber and self.Fail == True:
			attributes['background'] =  'Red'
			attributes['foreground'] = 'white'
		return attributes

self.Pass == True should probably be self.data.getValueAt(row, 2) == self.PartNumber,
and self.Fail == True should probably be self.data.getValueAt(row, 2) != self.PartNumber