Solved

Setting Global Fields on Server

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

9 Experts available now in Live!

Get 1:1 Help Now