Hi,
I would suggest the DIALOG.setArrayAttributes path as suggested by Stefan as it does give you more flexibility, although with a bit more coding required. Hopefully one day we will have a setArrayStyles equivalent so that you can do more than just colour.
However to answer your original question, there does appear to be an inconsistency between the documentation and the product, so there will need to be a task created. What I eventually did was create a .per form that worked that had ...
EDIT f01 = formonly.field1 , COLOR=RED WHERE f01 <0;
.. when I imported that into a .4fd, when I looked at the value for the ColorCondition property that had
COLOR = RED WHERE $VALUE < 0
So I suspect the Studio documentation needs to have its examples updated to make it clear that to refer to the value, you use the keyword $VALUE.
However you were trying to set the whole line to be red. The COLOR WHERE / ColorCondition only applies to the current field. In a. per when you compile you will get the following error if you try to reference another field.
error:(-2045) The conditional attributes of a field cannot depend on the values of other fields.
So as suggested by Stefan, I suspect you want to use the DIALOG.setArrayAttributes method .
Reuben