Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6614 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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!

Posted

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.

Posted

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 ; "" )

Posted

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. :)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.