Regarding Visual Attribute [message #84697] |
Mon, 19 April 2004 01:33 |
MEDHA
Messages: 6 Registered: February 2004
|
Junior Member |
|
|
Hi All,
I have made a form in 'Tablular' style with 6 columns. One of the columns is of 'Customer Stock' which can have negative values.
Now i want to colour all the rows red which has customer stock as negative.
Can u'll suggest me the code and tell me on which trigger to write it??
I have tried..........'Set_item_property','Set_block_property','Set_record_property',
but it dosen't work.
Medha.
|
|
|
Re: Regarding Visual Attribute [message #84706 is a reply to message #84697] |
Mon, 19 April 2004 22:27 |
mb sharma
Messages: 8 Registered: July 2002
|
Junior Member |
|
|
Just write following code in post-query trigger...
i had taken example of dept detail table..
--
DECLARE
cur_itm VARCHAR2(80);
cur_block VARCHAR2(80) := :System.Cursor_Block;
BEGIN
cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
WHILE ( cur_itm IS NOT NULL ) LOOP
IF :dept.deptno = '20' AND :SYSTEM.LAST_RECORD<> 'TRUE' then
Display_Item( cur_itm, 'VA_REQUIRED');
END IF;
cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
END LOOP;
END;
|
|
|
Re: Regarding Visual Attribute [message #84715 is a reply to message #84697] |
Tue, 20 April 2004 06:23 |
jan
Messages: 71 Registered: August 2002
|
Member |
|
|
1.create a visual arrtibute with the font color: red
2. create a when-new-record-instance trigger on the block and enter the following.
IF :CustomerStock < 0 THEN
set_block_property(current_record_attribute,'visual_red');
end if;
NOTE: please check the syntax and the current_record_attribute property.. i dont remember the property or syntax.
this might not work the way you wanted.. i.e. it will change the color of the current record if is has a negative customerstock.
hope this helps
JS
|
|
|
|