azriley

Hello world basic filemaker script

Discussion created by azriley on Oct 1, 2014
Latest reply on Oct 1, 2014 by robertwoods

All,

 

Trying to run a `hello world` filemaker script using the PHP API. Getting field not found error (105). Doesn't seem to matter if I call a script that exists or not. Any ideas on how to get a basic script working?

Big picture goal is to pass a parameter, do a commit records request and get a return value but first things first, need to execute any script. Sample code below.

Thanks!

Aaron

 

// PHP PAGE
$script_name = "Hello World";
$layout_name = ""; // why does it need a layout?

//when specifying a valid layout name, get error 3 - Command is unavailable (for example, wrong operating system, wrong mode, etc.)

$parameters = null; // basic, matches API code

 

$newPerformScript =& $fm->newPerformScriptCommand($layout_name, $script_name, $parameters);
$result = $newPerformScript->execute();
var_dump($result); die;

 

// FILEMAKER SCRIPT
Script Name: Hello World
#comment
Send Event["aevt"; "odoc"; "success or failure message"]
Open Url["google.com"]
Exit Application

Outcomes