5 Replies Latest reply on May 4, 2017 4:28 PM by JoeSand

    Variable and Object Name accounting?

    JoeSand

      Unlike most everything in Filemaker which provides lists to "pick" from whenever you need an item... fields, functions, etc... it seems that there is now way to account for the existence of variables and object names.  No lists, pickers, etc.  Is this true or am I missing something.  If so, what is the standard for tracking these things?

        • 1. Re: Variable and Object Name accounting?
          philmodjunk

          You are correct. Given how variables can be created and destroyed at will as scripts execute and calculations evaluate, I don't see how you could get a picker for variables, but an object picker might be a decent product idea to post--though even there, context will be an issue as object names are specific to a given layout.

          • 2. Re: Variable and Object Name accounting?
            gdurniak

            At the DevCon roll out of FileMaker 7,  we were told we "now had enough rope to hang ourselves"

             

            It would appear this has not changed

             

            Local $ variables are not a problem,  but Global $$ variables can get forgotten

             

            It would be nice if we could Define Global Variables like we Define Value Lists, then grab them from a pick list

             

            For this reason, I still often use a plain Global Field instead

             

            greg

             

            > If so, what is the standard for tracking these things ?

            • 3. Re: Variable and Object Name accounting?
              keywords

              If you have FM Advanced you can use the Data Viewer to see what variables are in existence at any given moment.

              • 4. Re: Variable and Object Name accounting?
                philmodjunk

                Other good practices.

                 

                Always use descriptive names.

                 

                Use Let variables where you can.

                 

                Use script variables where you can't use Let

                 

                Use global variables only where you have to.

                 

                Set global variables to "" when you no longer need them as this "destroys" the variable and it will no longer appear in the data viewer--helping keep the list of global variables showing in the data viewer as short as possible.

                 

                Note that calculations and variables that work with variables tend to evaluate faster than the same expression using a field instead so even though some care is needed in managing them, they can help improve system performance.

                • 5. Re: Variable and Object Name accounting?
                  JoeSand

                  Global variables, I guess I should have said, although even when creating a script it seems backward to have to type a variable more than once.  I thought that maybe the design report might show these things: because it contains all your scripts, I suppose a text search would locate anything that is used in a script...