Re: developer 2000...global variables

From: Marc <E.Mail_at_address.com>
Date: 2000/03/01
Message-ID: <89ie62$ivs$1_at_vkhdsu24.hda.hydro.com>#1/1


Maybe using a parameter instead is better, but another solution is the use of 'DEFAULT_VALUE'. This creates a global variable if it does not exists yet, and assigns it a default value. If the global already exists, nothing happens.

So, write in your WHEN-NEW-FORM-INSTANCE trigger :

default_value('N', 'GLOBAL.DIRECTORY');
IF :global.directory = 'Y' then ...

Marc

ssharma24_at_my-deja.com wrote in message <89htmu$ocb$1_at_nnrp1.deja.com>...
>I am using call-form built in:
>Form ‘A’ calls form ‘B’
>
>I initialize a global variable in Form A
>Saying :
>:global.directory := ‘y’;
>
>then in “when new form instance” trigger of form B, I put an if
>statement saying :
>If (:global.directory = ‘y’) then……statements…
>
>So, that when form B is called, Form B will know that it’s been called
>from form A.
>
>This works fine when I call form B from form A.
>
>The problem arises when I try to use only the form B (i.e. when I am
>not calling it from A). At this time it gives me an error saying
>that :error frm-40785 :global.directory variable does not exist.
>
>Please help..
>
>Thanks…
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Wed Mar 01 2000 - 00:00:00 CET

Original text of this message