Solved

Setting Global Fields on Server

Posted on 2011-09-25
3
369 Views
Last Modified: 2012-05-12
Hio
I would like to know how to set up a scheduled  script which will set a global field on FM11 Server so that the same value will appear on the clients computor.
The value of the field will need to be changed from time to time ,
I can do the change to the value on FM Pro 11 which is resident on the server but I would prefer to set it from the Client if this is possible.
Many Thanks

 
 
0
Comment
Question by:Krisraychris
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Expert Comment

by:jvaldes
ID: 36597988
If you have a specific application that needs to have a default value, I would put it in the open script. If it needs to be a variable read it from a table. This is how you should also set user and system preferences
0
 
LVL 25

Accepted Solution

by:
Will Loving earned 500 total points
ID: 36598520
When a FileMaker file is hosted using FileMaker Server, a global field retains whatever value was in it that last time that file was opened directly with FileMaker Pro, meaning prior to being hosted on FM Server. As you have noticed, when a client opens the hosted file, that last value is then what they see as the default value in the field.

To change the value permanently, take the file out of the hosted environment (or simply Stop the Database portion of FM Server), change the value and restart. To change the value dynamically - as jvaldes notes - create a script that runs on Startup which sets the value to whatever you want. The Startup script option has the added advantage that it can be made to put different values in for different users or different conditions. It could either be a strict calculation that says, "for this user use this value, for all others, use a different value", or if you  have a table of users, you can determine the correct value based on the user (or some other criteria).

To tell FM to use a particular script on Startup, go to File -> File Options and set the Startup script:

startup script
Finally, you might wish to consider using a Global Variable such as $$MyGlobalVariable instead. If  the value you are entering is not used in a relationship and just needs to be available, then instead of setting a Global field in the Startup script, you can set a Global Variable. A Startup script with  the Set Variable script step can be used to set the value for the Global Variable and, once set, Global Variables persist until the user closes the file.

Set Variable [ $$MyGlobalVariable ; "SomeValue" ]
0
 

Author Closing Comment

by:Krisraychris
ID: 36903446
I have used the Golobal variable and followed your instructions and it has worked well.Thnank you !
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question