2 Replies Latest reply on Apr 18, 2010 7:35 AM by gczychi

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

    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