executeapplescriptformula
SCRIPTTEMPLATE

The executeapplescriptformula statement executes an AppleScript, with embedded Panorama formulas.


Parameters

This statement has one parameter:

scripttemplate – Text of script template. Within the template you can place Panorama formulas that have a text result using this syntax:

"«formula»"

You can place formulas that have a numeric result using this syntax:

#«formula»#

Description

This statement executes an AppleScript. Using special tags, the script can access formulas that use Panorama fields and variables. (The formulas are actually calculated in advance, then substituted into the AppleScript code as constants.)

This example sets two AppleScript variables. var1 is set to She said "hello". var2 is set to 12. (Of course this script is not very useful since it doesn’t do anything with these variables.)

local x,y
x={She said "hello"}
y=2+2
executeapplescriptformula {set var1 to "«x»"}+cr()+
    {set var2 to #«y»*3#}

Note: This statement is included for compatibility with older databases, but for new applications we recommend using the applescript statement or applescript( function.


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.