Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: form trigger mixup

Re: form trigger mixup

From: Alan Mills <Alan.Mills_at_nospamservices.fujitsu.com>
Date: Tue, 22 Oct 2002 08:46:52 +0100
Message-ID: <ap2vpc$2k98$1@news.icl.se>


The reason this is not working as expected is that builtins like Go_Block and Execute Query are restricted builtins. This typically means that field navigation will occur but not in all cases. With a few exceptions these can only be used within KEY triggers and mouse actions like WHEN BUTTON PRESSED triggers. Your code will need to be on one of these triggers to work. Restricted builtins CANNOT be used within validation triggers. This is your problem. You will need to determine a set (good if you only have one) of KEY triggers to put your code in.

Probably easiest is to add a 'Query' button to your top block and put the code in the button press trigger of that. Also, add the code (make it a callable program unit) to the KEY-NXTBLK and KEY-DOWN triggers too.

You've hit, for me, one of the weaknesses of Forms. I've wanted to do this on a number of occasions and you find that you have to place the code in a number of places rather than just the one 'validation' routine where it would fire everytime you needed it.

However, validation triggers are for validation and not for processing so I also understand and appreciated the reasons for it being done the way it it. It's a dilemma.

"P B" <pbeliveau_at_avcorp.com> wrote in message news:7rk8rug9bfhft0lobt7rmm4v14qlesav56_at_4ax.com...
> I'm trying to build a locator form made of two block, one to enter
> parameter for the query and one to display the result. In my parameter
> block, I have a checkbox and a text box. To make a new query, I've put
> a WHEN-CHECKED-BOX-CHANGE trigger which call a function that will
> perform the query. This work fine.
>
> But if I change the content of the text box nothing append and I dont
> seem to find a trigger that can do the call to the query function.
>
> The function create a query sentence, then change the block property
> with the new sentence, then do a GO_BLOCK, then a EXECUTE_QUERY.
>
> Most of the the, the error that I got is that I cannot perform a
> GO_BLOCK
>
> Is there a kind of "standard" way to build such form?
>
> thanks
Received on Tue Oct 22 2002 - 02:46:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US