[FX.php List] How to use SetFMGlobal
malcolm at notyourhomework.net
malcolm at notyourhomework.net
Tue May 10 20:38:05 MDT 2011
Let me describe what I want to do, perhaps there is a better method.
I want to pass data from the web to the script. There are two items, a postcode which is used as the basis for search and a number which is the distance to extend the search range.
1. user provides postcode and optional extra distance
2. On the filemaker side.
1. Search by postcode
2. If the option "extend by distance" is present then set the global field to that value and run a script, which uses the global to perform a find which extends the range, and possibly the found set
4. return records
The thing that I want to achieve is pass transitory data from the web to FMP. I have no interest in the global persisting.
Malcolm
On 11/05/2011, at 12:54 AM, Ness, David wrote:
> Globals are unique to the user, and each call to fx.php is a unique user incident, so you must reset globals on each fx ‘transaction’.
>
> (I think this is right unless I’m wrong.)
>
>
> David Allen Ness
> Database Systems Administrator
> Web Applications Developer
>
> <image001.gif>
>
> From: fx.php_list-bounces at mail.iviking.org [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Jon Montgomery
> Sent: Tuesday, May 10, 2011 10:52 AM
> To: FX.php Discussion List
> Subject: Re: [FX.php List] How to use SetFMGlobal
>
> Malcolm,
>
> Globals do not work to well on the web. It has been a long while since I tried using one. It did not work and many people have told me that they just do not work on the web. I found ways around it to do the same thing.
>
> Sorry that I do not remember all the technical ways of explaining it, but the global is always reset to its default value with each call to the database the global you would set via the web will disappear right with each call to the database via the web.
>
> Not a very well explained/written explanation but that is the way I understand it.
>
> HTH
>
> Jon Montgomery
>
>
> On May 10, 2011, at 9:31 AM, Bob Patin wrote:
>
>
> Malcolm,
>
> I've not used that function, but I would guess, as with all of the FX functions, that it's fairly straightforward.
>
> Do you have the global on your web layout? If not, there's your problem.
>
> After you set the field, try echoing an error message:
>
> echo $queryResult['errorCode'];
>
> If it's a 102 error then the field isn't on the web layout; anything other than a 0 means something's amiss.
>
> HTH,
>
>
> Bob Patin
> Longterm Solutions
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
> iChat: bobpatin
> FileMaker 9, 10 & 11 Certified Developer
> Member of FileMaker Business Alliance and FileMaker TechNet
> --
> Expert FileMaker Consulting
> FileMaker Hosting for all versions of FileMaker
> PHP • Full email services • Free DNS hosting • Colocation • Consulting
> :
>
> On May 10, 2011, at 3:37 AM, Malcolm Fitzgerald wrote:
>
>
> I'm new to FX.php
>
> I can obtain results from my database on a simple search. Now I would like to extend the results by performing a script which relies on a global field. Whenever I include SetFMGlobal I don't get a result. If I comment out the line I do get a result, though my script returns the wrong set because the global is empty.
>
> Any hints appreciated.
>
> 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