Home » Developer & Programmer » Forms » How to clear form/block in item level triggers? (Oracle Forms Builder 10g)
How to clear form/block in item level triggers? [message #648955] Tue, 08 March 2016 12:11 Go to next message
Messages: 54
Registered: January 2016
Hi Friends,
I want to clear the entire form or any block when a value is changed in a particular field on the form. Please note the block to be cleared is different from the block on which item exists.
E.g- Block1 has 3 items which are LOV's and a button. Block2 has 4 display items which will display data based on the values of LOV's when button is pressed. Now whenever any LOV is changed, the entire form should be cleared or at least Block2 with 4 display items.
I tried writing clear_form in when-validate-item, key-listval, post-text-item, when-new-item-instance. I get error msg as - "restricted procedure in trigger".
Please assist

Any help is highly appreciated.
Re: How to clear form/block in item level triggers? [message #648972 is a reply to message #648955] Wed, 09 March 2016 01:07 Go to previous message
Messages: 21678
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Clearing the entire form would clear LoV items as well, so that's probably not what you want. Therefore, you need to clear Block2 (which means that you don't need CLEAR_FORM but CLEAR_BLOCK).

As you can't use restricted procedures (and CLEAR_BLOCK is one of them; read more about their usage in Forms Help) in certain triggers such as WHEN-VALIDATE-ITEM or POST-TEXT-ITEM you already mentioned, I'd say that you either didn't try the rest of the triggers (such as KEY-LISTVAL) or you aren't telling truth because it (KEY-LISTVAL) certainly allows restricted procedures.

Therefore, KEY-LISTVAL on LoV items which look like
would work. I guess you'd want to navigate back to where you previously were (so you'd add GO_ITEM after clearing the block).
Previous Topic: How to know from which input device data is entered into application
Next Topic: How to print report directly in oracle forms 10g
Goto Forum:

Current Time: Fri Jun 25 05:33:35 CDT 2021