Re: Help: formula checkbox not updating nicely

From: <pberetta_at_my-deja.com>
Date: Sat, 23 Oct 1999 14:19:13 GMT
Message-ID: <7usg50$mvq$1_at_nnrp1.deja.com>


[Quoted] You can add a POST-TEXT-ITEM trigger to each date item, using your form's block and item names, along the lines of:

BEGIN
IF :BLOCK.DATE_ITEM is NOT NULL THEN
:BLOCK.CHECK_BOX := 'Y';
ELSE
:BLOCK.CHECK_BOX := 'N';
END IF;
END; The check boxes should then work as you desire.

In article <7usa77$jb9$1_at_nnrp1.deja.com>,   Olli-Pekka Tarna <ollipekka.tarna_at_akermar.com> wrote:
> Hi real Gurus, these formula fields are driving me crazy!
>
> On my form I have 4 check boxes that are supposed to indicate
> if dates in 4 respective columns are not null. They are all
> in the same block.
>
> Check boxes are set as:
>
> Value when checked: Y
> Value when unchecked: N
> Value when other... : Unchecked
> Database Item: No
>
> Calculation Mode: Formula
> Formula: decode_date('block.field')
>
> Function Decode_Date that returns the value for the formula field is:
>
> FUNCTION decode_date(pcField IN char) RETURN char IS
>
> BEGIN
> if name_in(pcField) is not NULL then
> return 'Y';
> else
> return 'N';
> end if;
> END;
>
> The problem is that the check box fields do not change their state
> when dates are entered. Not even after committing the form. They
reflect
> the current state of the respective date fields only after the form
> being requeried.
>
> This is not what I want. Any help to get the check boxes updated at
> least after committing would be more than welcome.
>
> OPT
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sat Oct 23 1999 - 16:19:13 CEST

Original text of this message