Solved

Setting Global Fields on Server

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
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 Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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 …

911 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now