Solved

Setting Global Fields on Server

Posted on 2011-09-25
3
360 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
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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

810 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