[FX.php List] Passing Parameters for Perform Script Step
Chris Hansen
chris at iViking.org
Mon Sep 24 08:23:04 MDT 2012
Malcolm,
Sorry about the slow response (up to my ears in alligators...) You still need an action in there to actually cause FX to communicate with FileMaker. When it's something like just running a script (i.e. the record pulled up in irrelevant to what the script is going to do), I usually use a findany request, as it's really quick -- only ever returning a single random record. So that would be either FMFindAny() or DoFXAction('show_any'), depending on your preference. Let me know if you have any questions about this. Best,
--Chris
On Sep 20, 2012, at 9:34 PM, Malcolm Fitzgerald wrote:
> I'm not getting the script to work. Not having used this function before, I'm wondering if I have it right. Would someone check the code below for problems:
>
> $query = new FX('127.0.0.1', 80, 'FMPro7');
> $query->SetDBUserPass($u, $p);
> $query->SetDBData('rwh', 'www_editor_challenge');
> $query->SetFMGlobal('gbl_pwd',"$account|$password");
> $query->PerformFMScript('CWP: AssignedManager: Reset Password');
>
> I've checked:
> Account group is allowed to run scripts
> Account group has access to the layout
> Account group is allowed to modify records on this layout
> Account group is allowed to edit records and edit the fields in this table
> Script is set to run with full privs
>
> Malcolm
>
> On 20/09/2012, at 10:34 PM, BEVERLY VOTH wrote:
>
>> Hey, Malcolm! what about using this, too?
>> ====
>> SetFMGlobal ($globalFieldName, $globalFieldValue)
>> This function is FileMaker 7 specific and is equivalent to appending ".global" to a field name in order to set a global field. In order to ensure that a global is set in FIleMaker 7 (before performing a script, for example), use this function instead of AddDBParam() to set the global field.
>>>> The $globalFieldName parameter should contain the name of the FileMaker global field to be set.
>>>> The value passed via $globalFieldValue will be stored in the specified global field before other FileMaker actions are performed.
>> ====
>>
>> I'm sure "7" means .fp7 and .fmp12. :)
>> Beverly
>>
>> On 20 Sep 2012, at 2:08 AM, Malcolm Fitzgerald wrote:
>>
>>> I can see that PerformFMScript takes only one parameter which is the script name.
>>>
>>> I want to be able to change user passwords. That requires the old password and the new password. What is the best method to pass parameters from the web to the script?
>>>
>>> Malcolm_______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
More information about the FX.php_List
mailing list