Just to clarify what I have clarified... I know, I am repeating reduntant stuff... ha, ha.
I would and always declare variables set to NULL somewhere long before I use them. If the are used in a form then I declare them before I call the form and so on...
SO... SET VAR v1 TEXT = NULL
Do some work.. this work should cause v1 to be populated with a value.
Check to find out...
LABEL bypass4err SET VAR v1 TEXT IF v1 IS NOT NULL THEN --Do your work where cause v1 is already populated ELSE --pause for 2 using 'ERROR: variable is not defined' at center center DIALOG 'Enter value for v1' v1 vEndKey 1 GOTO bypass4err ENDIF
This should cover your situation And that's the truth :p Jim
Jim Limburg wrote:
Just to clarify what I have said it would look like this:
'''Somewhere in the code/forms/eeps before the var v1 should be used and declared.
Now you want to see if it exists...
SET VAR v1 TEXT IF v1 IS NOT NULL THEN --Do your work where cause v1 is already populated ELSE pause for 2 using 'ERROR: variable is not defined' at center center DIALOG 'Enter value for v1' v1 vEndKey 1 GOTO bypass4err ENDIF
Jim
Jim Limburg wrote:
James
Just use
SET VAR v1 TEXT
... or whatever datatype is is delcared to as before. Be sure to keep the datatypes the same though..
Don't set it to null. Doing it this way will not clear the variables setting if it already exist, but well set it to NULL if it doesn't exist.
Jim Limburg
James Hageman wrote:
I want to be able to find out if a variable exists and if not to create it and then pronpt the user to assign a value to it.
I thought I could do something like :
IF (IFEXIST(v1,.v1,NULL)) IS NULL THEN DIALOG 'Enter value for v1' v1 vEndKey 1 ENDIF
But I get an error message telling me v1 doesnt exist, Right! I know.

