Solved

Setting Global Fields on Server

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

631 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