Postquery event

Is it possible to execute a method depending on the value of a field in the record?

So in a list view form the method will execute for every record that is shown on the screen that has a certain value in one of its fields.

for instance : if the value of field1 = 3 then field2 has to be red.

The user is not selecting the record !

Hi Hans,

You can use an unstored calculation for this in combination with HTML.
Create a calculation of type TEXT and use the following code:

if ( field1 == 3 )
{
	return '<html><font color="#FF000">' + field2 + '</font></html>';
} else {
	return '<html>' + field2 + '</html>';
}

Now place this field on the form and set the displaytype to HTMLAREA and you are set.
If you want to change the background color instead then use a table and set the bgcolor of the table cell.

Hope this helps.

Thanks Robert,

Works fine !!!

Regards,

Hans