[FX.php List] FX and Editing Global Fields

Bradley Creamer creamerbradley at fhda.edu
Mon Nov 15 17:55:05 MST 2010


Hi Karstyn,

Here's the instruction set from the "Function Reference for FX.php":

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.

That's all I can find. So, my expectations of this function is to "set" 
the global field permanently regardless of session. I know that FMP11 
handles things much differently than FMP6, but why would the DB reset 
the value of a global field when it's asked so specifically change that 
value?

Regardless of my intent, where does it say globals are set on a 
per-session only, then revert?

I did find this from FileMaker's CWP documentation:


For direct XML requests and requests made via XSLT stylesheets that 
don't use sessions, the global values expire immediately after the 
request is made. For requests made via an XSLT stylesheet that use 
sessions, the global values persist for the duration of the session 
defined in the stylesheet, or until they are changed again with another 
request.

I seriously don't understand this behavior. Does anyone know of a 
work-around that makes the NEW global field value persist using XML?

Thanks,
Bradley


On 11/15/2010 4:41 PM, Karstyn McCoy wrote:
> Hi Bradley,
>
> Just to expand on this a bit, PHP can pull data from a global field, 
> but it will default to the value that was stored while the database 
> was last opened in single user mode.
>
> Remember that global fields are user session specific, so they can 
> behave much different from the web then they may from a FM client. As 
> Tim just mentioned the value may be set correctly, but each new PHP 
> query starts a new user session, so you will not get the last value 
> you set.
>
> It may help to know the broader issue you are trying to solve.
>
>
> --Karstyn
>
>
> On Mon, Nov 15, 2010 at 4:32 PM, Tim 'Webko' Booth <tim at nicheit.com.au 
> <mailto:tim at nicheit.com.au>> wrote:
>
>
>     On 16/11/2010, at 11:25 AM, Bradley Creamer wrote:
>
>>     Hi Chris,
>>
>>     I'm specifically asking you this question because I found your
>>     post at:
>>
>>     http://filemaker.463488.n4.nabble.com/Set-Global-Field-in-FileMaker-from-PHP-td2324363.html
>>
>>     ... where you say that FX works when editing a global field.
>>
>>     I haven't been successful.
>
>     How do you know that?
>
>     It may well be edited, but the next request you make effectively
>     re-logs the web user in (the web is stateless...) so that the
>     global will be rest to default... at least, that is my
>     understanding...
>
>     Now, my question - what are you trying to use a global field to do?
>
>     Cheers
>
>     Webko
>
>     _______________________________________________
>     FX.php_List mailing list
>     FX.php_List at mail.iviking.org <mailto:FX.php_List at mail.iviking.org>
>     http://www.iviking.org/mailman/listinfo/fx.php_list
>
>

-- 

******************************************************
De Anza Web Team / Technology Resources Group (TRG)
webteam at deanza.edu <mailto:webteam at deanza.edu>
----------------------------------------------------
Update Your Firefox Browser! (www.firefox.com <http://www.firefox.com>)
******************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20101115/77bc7cf7/attachment.html


More information about the FX.php_List mailing list