Adsense Ad

Wednesday 10 May 2017

Oracle Forms: Clear Item

CLEAR_ITEM Built-in

Description

Clears the value from the current text item, regardless of the current cursor position, and changes the text item value to NULL.

Syntax

PROCEDURE CLEAR_ITEM;

Built-in Type restricted procedure

Enter Query Mode yes

CLEAR_ITEM Example

/*

**   Built-in: CLEAR_ITEM

**   Example: Clear the current item if it does not represent

**   the first day of a month.

**   Trigger: When-New-Item-Instance

*/

BEGIN

IF TO_CHAR(:Emp.Hiredate,'DD') <> '01' THEN Clear_Item;

Message('This date must be of the form 01-MON-YY');
END IF;
END;

3 comments:

saalim said...

with the same requirement if want to clear multiple lines the what will be the logic.

saalim said...

hello...
I want to clear the detail block LOV selected record when i select value from master block LOV. My Scenario is:
I have text box for supplier in Master block. The data is populated through LOV. If i change the supplier, i need to clear the data in Detailed block(associated lov records only).

When i am changing LOV from master block its clear one one record in detail block.
I am not able to clear all records in detail block item field in POST-CHANGE TRIGGER.

begin
IF :masterblock.col1 != :detail.col1 THEN
:detailblock.col2:= null;
END IF;
end;


Can any one guide me how to solve this problem.

Regards,
saalim

saalim said...

hello ...
I want to clear the detail block LOV selected record when i select value from master block LOV. My Scenario is:
I have text box for supplier in Master block. The data is populated through LOV. If i change the supplier, i need to clear the data in Detailed block(associated lov records only).

When i am changing LOV from master block its clear one one record in detail block.
I am not able to clear all records in detail block item field in POST-CHANGE TRIGGER.

begin
IF :masterblock.col1 != :detail.col1 THEN
:detailblock.col2:= null;
END IF;
end;


Can any one guide me how to solve this problem.

Regards,
firoz