From: richard@r-senior.demon.co.uk (Richard Senior)
Newsgroups: comp.databases.oracle.tools
Subject: Re: Persistant variable in Form 6i
Date: 8 Aug 2001 08:24:27 GMT
Message-ID: <9kqsvr$tv$1@gate.local>
References: <e0c9495d.0108071309.70b1e7e3@posting.google.com>
    <997220476.23880.0.pluto.d4ee154e@news.demon.nl>
NNTP-Posting-Host: nidd.local
X-NNTP-Posting-Host: r-senior.demon.co.uk:158.152.211.38
X-Trace: news.demon.co.uk 997261195 nnrp-12:5049 NO-IDENT r-senior.demon.co.uk:158.152.211.38
X-Complaints-To: abuse@demon.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
NNTP-Posting-Date: 8 Aug 2001 08:24:27 GMT
X-Newsreader: knews 0.9.8
Lines: 31


In article <997220476.23880.0.pluto.d4ee154e@news.demon.nl>,
	"Sybrand Bakker" <postbus@sybrandb.demon.nl> writes:
> 
> "CupOfWater" <asiandoof@hotmail.com> wrote in message
> news:e0c9495d.0108071309.70b1e7e3@posting.google.com...
 
>> wouldn't want the message to come up every single time.  Is there a
>> way to create a persistance variable - a flag essentially that will
>> last for the execution of the form?
> 
> Create a package with a variable defined in the package specification.

Another way is to use a global variable in the form. These only allow you
to store character data up to 255 characters but they are visible across
all triggers in your form (in fact they are visible across different
modules in your runtime session too). There's no need to declare them,
just assign a value:

:GLOBAL.message_displayed := 'TRUE';

You might also find the DEFAULT_VALUE builtin useful for giving global
variables a value if they are null, e.g.

DEFAULT_VALUE('FALSE', 'GLOBAL.message_displayed');  

-- 
Regards,

Richard Senior
Mill Dam Consulting Ltd, London
Oracle Consulting & Training

