Re: Order of trigger firing ---HELP Needed.. Forms 5.0

From: Neville Sweet <sweet.neville.nj_at_bhp.com.au.no_junk_email>
Date: 18 Jan 1999 03:29:30 GMT
Message-ID: <01be4292$63e0fc20$483c1286_at_itwol-pc3963.itwol.bhp.com.au>


Hi Michael,

In the trigger text, you could try:

Validate(ITEM_SCOPE);
IF NOT Form_Success
THEN
  RAISE Form_Trigger_Failure;
END IF; This will terminate the When-Button-Pressed trigger immediately (assuming that the When-Validate-Item raises form_trigger_failure). Note that validation will occur during the commit process anyway, so your problem may be that an error condition in your WVI doesn't raise form_trigger_failure, and thus doesn't terminate Commit_Form.

By the way, the trigger sequence you refer to applies to navigation triggers defined at different levels, eg. WVI fires before a When-Validate-Record, and Post-Text-Item before Post-Block. The sequence is reversed on the way into an item, eg. Pre-Block fires before Pre-Text-Item. On the other hand, the firing sequence of the <same> trigger defined at multiple levels is controlled by the trigger property 'Execution Style'.

mdesouza_at_YAHOO.COM wrote in article <77n3gh$rkj$1_at_nnrp1.dejanews.com>...
> Hi all
>
> I have got an application which has a custom build tool and menu bar
>
> the save button is on the form . and when the user presses the save
button
>
> a block level trigger when_button_presses fires which call a procedure to
find
> out which button was pressed and appropriately call the
do_key('commit_form')
>
> Now the problem I am having is that I have called a text item field
> called effective_to_date which has a when_validate_item trigger at field
level
>
> if the user queries the record and then updates the effective_to_date
field
> and then presses the save button my form does not fire the field level
> trigger WHEN_VALIDATE_ITEM but fires the BLOCK level trigger
> WHEN_BUTTON_PRESSED first and then the WHEN_VALIDATE_ITEM trigger.
>
> Therefore my form never updates cause the table is locked by the
commit_form
> and therefore the form hangs
>
> I thought triggers fires in this order first item next block and finally
form
>
> Can someone shed some light on this problem
>
>
> any advice would be appreciated
>
> regards
>
> michael Dsouza
Received on Mon Jan 18 1999 - 04:29:30 CET

Original text of this message