post-query & when-validate-item triggers

From: Gert Ormel <g.ormel_at_mdx.ac.uk>
Date: Mon, 2 Nov 1998 10:14:46 -0000
Message-ID: <71k0mn$7s3$1_at_aquila.mdx.ac.uk>



[Quoted] 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.
[Quoted] Adding the condition :system.record_status <> ‘QUERY’ to the trigger-text of [Quoted] the when-validation-item triggers is not appropriate, since this would imply [Quoted] that after query, user input is not validated and the hidden fields will not become populated either.
[Quoted] 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 [Quoted] 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 [Quoted] 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 Mon Nov 02 1998 - 11:14:46 CET

Original text of this message