Re: How can I check to see if a variable has been defined

From: Jeff Li <jef_at_iedv6.acd.com>
Date: Sat, 28 Aug 1993 02:17:14 GMT
Message-ID: <1993Aug28.021714.26543_at_acd4.acd.com>


In article <930827155629.2082023b_at_bfsec> AMEBAN_at_bfsec.bt.co.uk (ALAN MEBAN (0232) 894313) writes:
>(I thought the answer to this question would be in the Oracle FAQ,
>but having had a look though it, I can't see it.)
>
>How can I tell, within SQL*Forms 3, if a global varriable has been
>declared.
>
>--------------------------------------------------------------------
>The story so far ...
>
>I have a form called 'courses' which contains a bit of code:
>
> :global.value := :details.value;
> call ('categories', NO_HIDE);
> ...
>
>The global :global.value is being used to pass 'value' into the
>called form 'categories'.
>
>In the 'categories' form, another bit of code grabs the value being
>passed from 'courses' as below:
>
> :control.value := :global.value;
> ...
>
>This works wonderfully, until some twit calls the 'categories' form
>from the command line instead of from the other form, and
>:global.value isn't defined. SQL*Forms, as would be expected, gives
>the error:
>
> 'FRM-40815 Variable :GLOBAL.value does not exist'
>
>and then carries on regardless; wiping a whole pile of records as a
>consequence.
>
>
>Surely, there must be a way of testing to see if :global.value exists
>without having to resort to an messy 'on-error' trigger.
>
>
>Any ideas would be most appreciated.
>
>Alan Meban / ameban_at_bfsec.bt.co.uk
>----------------------------------
> "My views, not my employer's"

You can default the global variable when the form gets start (in PRE-FORM trigger), and then check the value of the global variable in the start-up key trigger to determine whether it is called from a calling form or a user. This works fine with FORM 2.3, but I am not sure if it works with FORM 3.0. Jeff Received on Sat Aug 28 1993 - 04:17:14 CEST

Original text of this message