[FX.php List] Problem with Global fields

Roger Price rp272 at cam.ac.uk
Sun Apr 15 05:30:44 MDT 2007


Erik

This is both  a simple an elegant solution and makes global fields work for
all users and across multiple databases and tables. I shall set this up on
Monday morning.

I understand the requirement to have global fields that are client specific
to enable the creation of related records in other tables, however there is
also a need for 'universal' fields too.

Thanks for your advice

Kindest regards

Roger
  

> From: Erik Andreas Cayré <erik at cayre.dk>
> Reply-To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
> Date: Fri, 13 Apr 2007 22:39:14 +0800
> To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
> Subject: Re: [FX.php List] Problem with Global fields
> 
> 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