With this code we compare the number of the bed with the last one we use, then we paint the background of this last one and the other values will return at his own colors, but when use the code as we can see in the image below it don't get updated and still got painted the last and the new but the new is only half paint, the border is another code we use and it is functional and it is basically the same code so the background paint cells need to be in there and not where are both of them, we need to stop or save the program and then the green background cells get where it need to be, so the code is barely functionally. We use the tag you see and linked, the other color working with "no usar", "no sensa", "" work perfectly.
camnum = self.view.params.CamNum
last = int(system.tag.read("[Paint]ASRS/Last_A").value)
if camnum == last:
return "#46FF64"
else
if value == "":
return '#C1C7C9'
if value == "no usar":
return '#C1C7C9'
if value == "no sensa":
return '#C1C7C9'
else:
return '#83B1CF'