AnsweredAssumed Answered

newPerformScriptCommand

Question asked by pewi on Oct 17, 2014
Latest reply on Oct 17, 2014 by pewi

Hi there,

 

I'm having some diffuculties using the newPerformScriptCommand in my php-script. I'm trying to pass the search criterion that the user enters in af form field as a variable called $Search, but somehow it dosen't seem to reach the FM script as I get this respons from print($result): Find criteria are empty

 

The script goes like this:

 

<?php

 

 

/* This script performs a search in the "Varer" table using FM Quick Find */

 

 

$Search = trim($_REQUEST['Search']);

 

 

require_once("FileMaker.php");

 

 

$fm = new FileMaker();

$fm->setProperty('hostspec', 'http://xx.xx.xx.xx');

$fm->setProperty("database", "My Fashion Room");

$fm->setProperty("username", "xxxxxx");

$fm->setProperty("password", "xxxxxx");

 

 

$newPerformScript = $fm->newPerformScriptCommand("Varer", "QuickFind vare", $Search);

$result = $newPerformScript->execute();

print($result);

 

 

echo($result->getFoundSetCount());

 

?>

 

In FM I have this simple script:

 

Perform Quick Find [$Search] with full script privileges set.


Can anyone figure out, what I am doing wrong?

 

Regards

 

Peter

Outcomes