[FX.php List] Problem with Global fields
DC
dan.cynosure at dbmscan.com
Fri Apr 13 10:47:08 MDT 2007
Erik,
You just very succinctly described "server globals." As you said, in FMP
these are implemented using a single-record utility database. Very handy
for certain tasks. I'm not sure it was completely clear that the fields
in this utility database need to be defined as normal text, number,
calc, etc... fields and NOT global fields themselves!
Contrast this technique with normal FMP global fields which can be
called "user globals" because they are only "global" to the current
"user" and the database, but they are not shared. Also very handy for
certain other tasks.
You can do a nice trick in FMP combining these two ideas. Put a real
global text field (as opposed to a normal text field) in the utility
database and relate it to an id field in another database. If you place
return-separated ids (keys) into the "user global" field in the utility
database you get a multi-line key which is a quick way to get ad hoc
related-record sets.
dan
Erik Andreas Cayré had written:
> I've run into a lot of similar 'challenges' with Global fields
>
> Aside from the very good suggestions already posted, i want to add one
> which I've used successfully:
>
> Create a table (FMP7+) or database (FMPU6) which from the outset will
> contain only one record.
> In this table you create regular fields for 'Global' you need.
> Relate this table to whichever other tables you need it to work with
> using a calc number field =1 (on both ends of the relation).
> This last trick ensures any record in one table will always relate to
> all records in the related table.
>
> This way you can have fields which act global the way many people
> expect/need. Like global variables in PHP...
>
> regards
>
> /eac
>
> Den 13/04/2007 kl. 20.31 skrev Roger Price:
>
>> Gjermund
>>
>> This explains why it worked with one global field and not the other. I
>> began developing this solution before receiving my copy of FMPSA8 and
>> was using FMP6U. I made all the database changes on the 'host' copy
>> which was why the global field was available to all.
>>
>> Thank you for solving the mystery!
>>
>> kindest regards
>>
>> Roger
>> ----- Original Message ----- From: "Gjermund Gusland Thorsen"
>> <ggt667 at gmail.com>
>> To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
>> Sent: Friday, April 13, 2007 1:03 PM
>> Subject: Re: [FX.php List] Problem with Global fields
>>
>>
>>> If the global field value is static
>>>
>>> Take the file offline
>>> change the value in the global field, close the file, reopen it and
>>> check with different users that the value is the same
>>> put the file online again.
>>>
>>> ggt667
>>>
>>> On 4/13/07, gerry.charest at agfa.com <gerry.charest at agfa.com> wrote:
>>>>
>>>>
>>>> Roger,
>>>>
>>>> The blank global field is a result of context. Global field values are
>>>> unique by user. If several people have a copy of the database open
>>>> they each
>>>> have a unique set of global values. The connection to the web can be
>>>> viewed
>>>> as another user thus it has its own set of global values. Another
>>>> consideration you may wish to consider is the use of Auto enter
>>>> calculation.
>>>> This allows you to store and index the value with less overhead than a
>>>> calculation.
>>>>
>>>>
>>>>
>>>>
>>>> "Roger Price" <rp272 at cam.ac.uk>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> "Roger Price" <rp272 at cam.ac.uk>
>>>> Sent by: fx.php_list-bounces at mail.iviking.org
>>>>
>>>> 04/13/2007 07:26 AM
>>>> Please respond to
>>>> "FX.php Discussion List" <fx.php_list at mail.iviking.org>
>>>>
>>>>
>>>> To
>>>> "FX.php Discussion List" <fx.php_list at mail.iviking.org>
>>>>
>>>>
>>>> cc
>>>>
>>>>
>>>>
>>>> Subject
>>>> [FX.php List] Problem with Global fields
>>>>
>>>>
>>>> I experienced a problem recently with an FMP calculation field that
>>>> included a global value as an option in an 'if' statement.
>>>>
>>>> The field correctly displayed in FMP but the 'global' option did
>>>> not show
>>>> up when selected by FX.php (the other other did!).
>>>>
>>>> I was reccommended to get the values of both field found by FX.php
>>>> and use
>>>> PHP to make the correct selection.
>>>>
>>>> This worked!
>>>>
>>>> I now have another 'global' field that I want to do something
>>>> similar with
>>>> but the value of the 'global' field appears to be blank. If I use 'if
>>>> (isset($value['global_field'][0])){echo
>>>> "set";}else{echo"unset";}' it returns "set" so there must be
>>>> something there
>>>> - just not the value I expect.
>>>>
>>>> To overcome this problem I have changed the global field type to
>>>> 'calculation' and added the value required. There are not a great
>>>> number of
>>>> records so the additional overhead is not excessive in this case.
>>>> However I
>>>> would like to know what is happenning with these global fields.
>>>>
>>>> In my original calc field I substituted a text string for the
>>>> global field
>>>> which worked just fine, however reverting to the 'global' resulted in a
>>>> blank field!
>>>>
>>>> Any ideas?
>>>>
>>>> Roger
>>>>
>>>> _______________________________________________
>>>> 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
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
>
> ---
> Erik Andreas Cayré
> Spangsbjerg Møllevej 169
> 6705 Esbjerg Ø
>
> Privat Tel: 75150512
> Mobil: 40161183
>
> ---
> »Kun p....sure mennesker kan ændre verden. Innovation skabes ikke af
> 'markedsanalyse', men af folk, der er afsindigt irriterede over tingenes
> tilstand «
> --Tom Peters
>
> »Hvis du ikke kan forklare det simpelt, forstår du det ikke godt nok.«
> -- Albert Einstein
>
> »Hvis du ikke har tid til at gøre det rigtigt, hvornår vil du så have
> tid til at lave det om?«
> -- John Wooden, basketball coach
>
>
> _______________________________________________
> 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