script to change text colour
I was wondering if anyone could give me a pointer. Lets say i have one number field and i want to change the colour of the text depending on certain criteria.
1) If the value is the same as the previous record, i'd like the text to be Magenta
2) If the value is higher than the previous record, i'd like the text to be blue
and 3) If the value is lower than the previous records, the text to be green.
I then thought i could loop it throughout all records but i can't work out the script to compare the same field between records.