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

From: Joe Brown <joe_at_hopi.dtcc.edu>
Date: 5 Nov 1998 16:23:01 GMT
Message-ID: <71sjd5$ii2$1_at_apache.dtcc.edu>


After changing the value of a non-base table item, in a post-query trigger:

set_record_property(:system.trigger_record, :system.current_block, STATUS, QUERY_STATUS); T o prevent forms from thinking that the user has changed the data in the block.

This technique has served me well with Forms 5.0. I think it will work with 4.5 also..

In article <71k0mn$7s3$1_at_aquila.mdx.ac.uk>, Gert Ormel <g.ormel_at_mdx.ac.uk> wrote:
>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
>
>
>

--
(: Joe Brown :)				      joe_at_apache.dtcc.edu
I believe Wine is going to be great if it ever gets finished. . .
I believe Linux _is_ great even though it's not finished! ! !
I believe you have my address.  :-)
Received on Thu Nov 05 1998 - 17:23:01 CET

Original text of this message