Change image in field of grid based upon field content

Hi - I have a grid with multiple columns and rows. Assuming the one column is called “alert”. Alert can either be “0” or “1”. I would live the grid to show a different image based upon whether its value is “0” or “1”.
I assume this is done in the onRecord event.

I just can’t seem to make this work. Please can someone advise.

Thanks. Really appreciate it

(this is a php method; called from onRecord in the grid)
IF ({job.active_timer} == ‘Y’) {

{img_timer} = 
"<img src='../_lib/img/scriptcase__NM__ico__NM__stopwatch_stop_16.png'/>" ;
	} else {
{img_timer} = 	
"<img src='../_lib/img/scriptcase__NM__ico__NM__stopwatch_run_16.png'/>" ;