AnsweredAssumed Answered

Checking, if a variable is undefined (not yet defined)

Question asked by gczychi on Apr 17, 2010
Latest reply on Apr 18, 2010 by gczychi

Title

Checking, if a variable is undefined (not yet defined)

Post

HI,

 

I was wondering if there is a standard way in FileMaker to check if a variable has already been defined or is undefined and didn't find anything. But, I may have found a way:

 

Say, you are executing a script and need to know if the variable $$foo has already been defined somewhere (or is just empty). I came up with the following solution:

 

if [$$foo < 0]

   Show Custom Dialog ["Gotcha!"]

End if

 

This seem to work in my scripts. What do you think? Is this a proper workaround?  Or is there a better way?

 

Thanks a lot,

 

Gary

 

Outcomes