I want to do a simple thing. Based on the value of an item, I wish to change the formatting of another item.

Like for example, if my checking item is say 'Confirmed', and if 'Confirmed is 1, the format the Status item as green, and if not then make it red.

My problem is that it works only when status has changed. In other words, the formatting applies to the status item only when the value of status item has changed from before.

Heres some code...

Data.onItemUpdate = updateItem;
Data.onChangingValues = formatValues;


function formatValues(item, itemUpdate)

if(itemUpdate.getServerValue("Confirmed") == "1")
itemUpdate.setAttribute("ItemStatusField" ,ColorNeutral, ColorPositive,"backgroundColor");

In the above code... the colors change only if the value of "ItemStatusField" has changed in the current update.

Why is it like this? What do I do?

Thanks in advance!!