1 of 1 people found this helpful
If you've got Filemaker Pro Advanced, you can just open the data viewer. This will display all session based variables ($$var) and also execution/script variables ($var) when you are stepping through a script in the debugger.
As for querying it, no, I'm not sure you can, but I am not terribly familiar with all the new metadata functions that seem to have popped out of ExecuteSQL(). You can check a variable to see if it's declared (IE length($thisVariable) > 0 )
Best practice is to use comments at the beginning of your scripts to comment about what variables are being declared below.
You could also build in your own tracking measure by keeping a session variable list.
IE set variable $$declared = $$declared & ¶ & thisVariable
and run your check against $$declared. This doubles your script steps every time you declare (or undeclare) a variable though.
My question was based on another thread (Dynamic Variables) and got me to wondering if I could bulk clear a whole suite of dynamically created variables without knowing what they were called.
SetVariableSpace[("")] sort of thing.
"Weeks of programming can save you hours of planning." -- unknown
I think Ernest Koe's set of custom functions for variables basically did that sort of thing. If I recall correctly, you called a function to store a variable and its value, and that function both created the dynamic variable and added its name to a global variable, thus making it possible to know what variables had been defined (or had yet to be defined) and then retrieve, modify, or clear their values.
With custom functions as well, you can add "collision detection", IE patterncount() on the list to make sure you're not declaring or removing dupe variables.
Drew, did you have a link to the proof group blog post on that?
This may not be what you're looking for, but Goya's invaluable Base Elements analysis tool can give you all variables used in your application.
I do use BE. What I was hoping to be able to do was to "scrape" the variable space realtime.
I wrote an ad for Apple Computer: "Macintosh - We might not get everything right, but at least we knew the century was going to end." ~Douglas Adams