[FX.php List] RE: Running a FM script from PHP/FX on more than one PC

Fitzgerald, Theodore C ted-fitzgerald at uiowa.edu
Fri Jul 18 18:27:37 MDT 2014


In my experience, when I run a script from FX it has always only ran against the Found Set.  You can also pass script parameters to scripts like so:

$request->AddDBParam('-script.param', $InUseBy);

and then do a find in your script on FileMaker.  Although since you only have one find criteria, I'm not sure why you would do this in your situation...just something for the future perhaps!

From: fx.php_list-bounces at mail.iviking.org [fx.php_list-bounces at mail.iviking.org] on behalf of csinfo [csinfo at criticalsolution.com]
Sent: Friday, July 18, 2014 3:50 PM
To: FX.php Discussion List
Subject: [FX.php List] Running a FM script from PHP/FX on more than one PC

I have a script that runs from the windows command line of a client, it inserts data and processes the data to turn it into a job.
Now my client wants a few PC to be able to run it but in initial tests, the scripts are stepping on each other and the Jobs are a mixture of data from multiple sources.
Does anyone know if when I call a FileMaker script with FX, it will run on only the found set.?
If so, I would do it flag records by a PC identifier and find them while running the script.

Sample code:
$request = new FX($ServerIP, $Port,$dataSourceType );
$request->SetDBData($fmdb,$Layout, $Group);
$request->SetDBUserPass($fmAccount, $fmPass);
$request->AddDBParam( 'InUseBy', $InUseBy );   //$InUseBy = PC1..PC2..PC3 etc
$request->AddDBParam('-script', 'FMScriptToRun' );

I will be testing this onsite but I thought some input is always helpful.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20140719/c8e9a26c/attachment.html

More information about the FX.php_List mailing list