AnsweredAssumed Answered

setResultLayout with newPerformScriptCommand

Question asked by Gnurps on Aug 29, 2009


setResultLayout with newPerformScriptCommand

Your post

The Filemaker API for PHP lets you run a Filemaker script from PHP by calling newPerformScriptCommand(). I got this to work, calling a FM script that makes a new order from my web temp order. But what fields are present in the result set? I am guessing that they are the fields of the layout where the Filemaker script ends. This is not documented. The API documents say that the class FileMaker_Command_PerformScript inherits the method setResultLayout, which takes the name of a layout as a parameter. But this breaks my script and my whole Apache web server needs to be restarted when I include that step. 


This works:


$fmscript = $BCA_DB->newPerformScriptCommand('WebTempOrders','Edit Web Order',$scriptparam);$scriptresult = $fmscript->execute(); 

 This does not:


$fmscript = $BCA_DB->newPerformScriptCommand('WebTempOrders','Edit Web Order',$scriptparam);$fmscript->setResultLayout('Web_Orders_Checkout');$scriptresult = $fmscript->execute();

 What am I doing wrong? And what does control the field data present in the result of running a FM script from PHP?


Thanks to anyone who can help,

Gary Sprung