Re: post-query & when-validate-item triggers

From: Wim Jans <bs130659_at_skynet.be>
Date: Wed, 4 Nov 1998 19:32:22 +0100
Message-ID: <71q6cv$4g1$1_at_news1.skynet.be>


Set the record status back to query:

  Set_Record_Status(Name_In('system.trigger_record'), Name_In('system.trigger_block'), STATUS, QUERY_STATUS);

Wim

Gert Ormel heeft geschreven in bericht <71k0mn$7s3$1_at_aquila.mdx.ac.uk>...
>Hello all,
>
>A common situation in Forms is to have a post-query trigger populate the
>non-base fields in a base-block. A when-validate-item trigger on the
>non-base fields ensures that users can not input rubbish and populates the
>(usually) hidden base-fields (e.g. ID fields) by calling a function or
>procedure.
>A problem with this scenario is that after query, the :system.record_status
>is always set to ‘CHANGED’, as the validation triggers fire, overwriting
the
>hidden ID fields.
>Adding the condition :system.record_status <> ‘QUERY’ to the trigger-text
of
>the when-validation-item triggers is not appropriate, since this would
imply
>that after query, user input is not validated and the hidden fields will
not
>become populated either.
>Using a pre- and post-item trigger on the non-base fields in stead of a
>when-validation-item works well, except when the user changes the value in
>the non-base field, realises that the change was wrong and sets the value
in
>the field to what it was originally. In this situation, when s(he) wants to
>exit the screen, Forms issues the alert ‘Do you want to commit changes?
This
>is slightly confusing, as the user thinks that there haven’t been made any
>changes at all.
>Any suggestions for a ‘clean’ solution are appreciated.
>
>Gert
>
>
>
Received on Wed Nov 04 1998 - 19:32:22 CET

Original text of this message