October 6, 200619 yr I have a solution with a large number of reports. Is it possible to store script references in a field and run them by name? It looks to me that the only way to run a script is by choosing it in the Script list. Any help appreciated!
October 6, 200619 yr Is it possible to store script references in a field and run them by name? Not that I'm aware of, Phillip. The best you can do is use script parameter or variables, something like: If [ Get ( ScriptParameter ) = "Do this" ] Perform Script [ Do This ] Else If [ Get ( ScriptParamter ) = "Do that" ] Perform Script [ Do That ] ... and so on.
October 6, 200619 yr Hi LaRetta aren't you aware of EventScript ? He can use a field (ie: fieldName) with a custom value list of script's names and, in the AutoEnter/Replace option put a calculation, something like: scriptName & S4HU_EventScript( Get(FileName) ; scriptName ; "" )
October 6, 200619 yr Using a Set Variable or a Set Field script step, it is also possible to trigger dynamically a script thru our EventScript plug-in... Obviously, the perform script statement offered by FileMaker need a stupid and hard-coded scriptname. But with a triggering plug-in (EventScript or another one), the name of the script to launch can be defined inside a calculation for the Set ... script step. Then the Set Variable (or the Set Field) command would simply trigger dynamically the right script by evaluating the calculation that contains the scriptname. Of course, the name of the script to launch needs to be correctly specified before the "pseudo-perform-script" executes. So if you are using "just-in-time" programmation, make sure to place the scriptname before trying to execute it. :)
October 6, 200619 yr Author Thanks folks - the EventScript did the trick nicely... Quite a nice plugin for the money! -) Philip
Create an account or sign in to comment