I have a data block with n records. One item in each record hights rwvbudg_perc_used. I want to have its foreground color depend on its magnitude. I have inserted the following PL/SQL code in the trigger post-change of the item.
if :rwvbudg_perc_used > 95
then
set_item_property (find_item(‘rwvbudg.rwvbudg_perc_used’), foreground_color, ‘red’);
else
set_item_property (find_item(‘rwvbudg.rwvbudg_perc_used’), foreground_color, ‘black’);
end if;
I have ascertained by tracing that the trigger is actually invoked and that the correct path within the if block is taken. There are values of the item displaying both above and below the criterion value, but no color change occurs, nor does any error message arise. What mistake might I be making?
addition:
With a lot of hunting around I have found that I should be using set_item_instance_property on the current record (set_item_property switches the whole column of the item back and forth in color). Alas, foreground_color is not an allowed value in set_item_instance_property; if I try to use it I get FRM-41383. An ideas?