Solved

Problem with global fields getting wiped out..??

Posted on 2014-01-13
1
561 Views
Last Modified: 2014-01-13
I'm working with a bunch of scripts in FileMaker that make calls to a web host online.  This particular solution is going to be used by different companies, so I'd like to make the domain of the server the scripts are using dynamic so anybody using the solution file can quickly update it.

I created a new table called Global_Config and I added some fields to this table including one called domain.  Then within my scripts I'm pulling the value from this so we can easily change it from the config if/when the domain ever changes.  

It works just fine as long as the value is filled in to my Global_Config fields, however, for some reason all of those fields keep getting wiped out.  I can't figure out why it is, but suddenly the stuff stops working, I run a quick test and I see that it's trying to hit www./something (leaving out the domain.com that would be pulled from the config table.)  

So then I go back and look at my Global_Config layout and the fields are all empty.  

Any information on what could be causing this would be greatly appreciated.  Thanks!
0
Comment
Question by:Andrew Angell
1 Comment
 
LVL 24

Accepted Solution

by:
Will Loving earned 500 total points
Comment Utility
Global fields are not only global to all records in the table but they are temporary in that the values placed in them only exist for the duration of the user's session. The moment you close the file, any values placed in them during your guest session to the server are lost. This allows multiple guest users to place values in those global fields and not affect each other.

In order to have global fields initially populated with a specific value when the file is opened, you need to either 1) populate it on file open via a script, or 2) Stop FileMaker Server, open the file(s) directly in FM Pro, populate the field, close and then Restart the database in FM Server.

If you do the latter method, any values that were placed in a global field when it was in unhosted, single-user mode will be the initial value when a guest opens the file from FM Server. The guest can of course change the value in the field if they have the privileges, but regardless of whether the field is initially populated or blank, any changes made by a guest are lost on opening.

If you are interacting with the file via Custom Web Publishing (CWP) or Instant Web Publishing (IWP) and you want certain values to be in the global fields during those interactions, then you need to use one of the methods above to set them, most likely the second method described.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

12 Experts available now in Live!

Get 1:1 Help Now