Home » Developer & Programmer » Forms » HOW KNOW IF A GLOBAL VARIABLE EXIST OR NOT
HOW KNOW IF A GLOBAL VARIABLE EXIST OR NOT [message #82382] Fri, 23 May 2003 02:58 Go to next message
Ful
Messages: 2
Registered: March 2003
Junior Member
I would know, if a global variable exist or not.
If it does not exist i create it and i set it to NULL otherwise i keep its content.

I tried whit an if inside an handle exception, but the system give me an error.

Is there a specific function?

PLZ HELP!!
Re: HOW KNOW IF A GLOBAL VARIABLE EXIST OR NOT [message #82387 is a reply to message #82382] Fri, 23 May 2003 05:01 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
From Forms Help:
DEFAULT_VALUE
--------------
Copies an indicated value to an indicated variable if the variable's current value is NULL.  
If the variable's current value is not NULL, DEFAULT_VALUE does nothing. 
Therefore, for text items this built-in works identically to using the COPY built-in on a NULL item.  
If the variable is an undefined global variable, Form Builder creates the variable. 

Syntax

PROCEDURE DEFAULT_VALUE
  (value_string  VARCHAR2,
   variable_name  VARCHAR2); 
Built-in Type   unrestricted procedure 
Enter Query Mode  yes 

Parameters

<i>value_string</i>	A valid VARCHAR2 string, variable, or text item containing a valid string. 
<i>variable_name</i>	A valid variable, global variable, or text item name.  
The data type of the variable_name is VARCHAR2.  Any object passed as an argument to this built-in must be enclosed in single quotes. 
Previous Topic: forms docs
Next Topic: calling image...
Goto Forum:
  


Current Time: Thu Mar 28 20:29:43 CDT 2024