Philip Cottrell Posted October 6, 2006 Posted October 6, 2006 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!
LaRetta Posted October 6, 2006 Posted October 6, 2006 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.
Raybaudi Posted October 6, 2006 Posted October 6, 2006 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 ; "" )
Homer Posted October 6, 2006 Posted October 6, 2006 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. :)
Philip Cottrell Posted October 6, 2006 Author Posted October 6, 2006 Thanks folks - the EventScript did the trick nicely... Quite a nice plugin for the money! -) Philip
Recommended Posts
This topic is 6614 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now