Change field color depending on content

I have a control application. Using event onLoad, I fill the fields from a query. Depending on the content of the fields, I would like to change the color of the field. Eg. green when OK, red when in error. I tried to use the macros sc_field_color and sc_field_style, but they don’t seem to get called. Any idea how to do this ?

You are on the right path is using the sc_field_color macro, just remeber to use your field name correctly, commonly this will be affected if you use special chars in your field name. if you post a sample of your code we can help you.

Regards

No, afaik this macro only works on grids, not forms. You need to use javascript to achieve that. I couldn’t find the post, but I know it’s here on the forum. Just google a bit.

Ok,

Thanks Albert