![]() You could also easily write your own java code, package it as a. This means you can bundle in things like the Jakarta Commons packages or JavaMail. jar file, and any scripts you execute will have access to the classes in that. If there's some lib you need to use that isn't in the JDK, you can load it into the ScriptMaster classpath by using the SMLoadJar function. ![]() If an error occurs during evaluation, the field is left as is. merge(template) Processes some text with merge fields embedded, replacing the merge fields with their evaluated values. performScript(fileName, scriptName ) Performs a FileMaker script in the current file, passing in the optional paramString as a parameter. The fmcalculation parameter can be any valid FileMaker calculation string. This is accomplished using the reserved fmpro object.Įvery Groovy script which is executed will have an fmpro variable set to an instance of an FMPro object, which has two important methods: evaluate(fmcalculation) Evaluates the supplied FileMaker calculation text, returning the result as a String. In addition to setting variables prior to script execution, you can access the FileMaker calculation engine directly from within your Groovy script. This is a handy way to get data from FileMaker into your custom scripts.Īfter a ScriptMaster script is evaluated using the EvaluateGroovy function, you can access any of the named variables which were set during execution using the SMGetVariable function. You can set variables prior to executing a script using the SMSetVariable function. (such as closures) to the standard java API, some of which can be big timesavers.Ĭonsult the FileMaker demo file and the Groovy website to see some of the things you can accomplish with this language. In addition, Groovy adds new methods and syntactical improvements ![]() Groovy is based on the Java programming language,Īnd for the most part you can pass straight Java code into the EvaluateGroovy function and it will work fine. ScriptMaster allows execution of Groovy code from within FileMaker.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |