Jump to content
Server Maintenance This Week. ×

Global field


This topic is 8769 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hello,

Nice to meet you in this new forum dedicated to our preferred MDBS.

Actually, I've got a problem with FMP Server which, as anybody knows, forgets global fields when a users close a file.

In my case, I've declared a counter as a GF, but I absolutely need to remember the information for the others users, specially those still connected.

Does anyone find a process to keep the data in ?

According to my poor english, do not hesitate to contact me if my question is not clear !

Pat

Link to comment
Share on other sites

What you need is a 1 record database.

Every time you need to increment the counter the script would be as follows:

Database:

Counter.fp5

Fields:

Access (Global Number)

Number (Number, Stored)

iOne (Calculation, Value: "1",Stored)

Database:

(Your Database)

Field:

Number (Number, stored) (This is where the counter will be stored in your file)

iOne: (Calculation, Value 1, Stored)

Relationship:

Counter: File (xx) to Counter.fp5 iOne=iOne

Script:

If [Counter::Access = 1]

Loop

Pause/Resume Script [0:00:01]

End Loop

Else

Set Field [Counter::Access, 1]

Set Field [Counter::Number,Counter::Number +1]

Set Field [Number, Counter::Number

Set Field [Counter::Access, 0]

End If

Hope this helps.

[This message has been edited by Ocean West (edited May 01, 2000).]

Link to comment
Share on other sites

  • Newbies

quote:

Originally posted by ppo:

Hello,

Nice to meet you in this new forum dedicated to our preferred MDBS.

Actually, I've got a problem with FMP Server which, as anybody knows, forgets global fields when a users close a file.

In my case, I've declared a counter as a GF, but I absolutely need to remember the information for the others users, specially those still connected.

Does anyone find a process to keep the data in ?

According to my poor english, do not hesitate to contact me if my question is not clear !

Pat

Hello Pat,

I had the very same problem. I solved it by creating a separate file called "Global". Any file which needs to store global values can store it's values in this file. What I do is to create a unique relationship for each file which needs it, to the Global file. The fields in the "Global.fp3" file are not real global fields, they are regular text, number, etc. fields. All the "global" values are stored in a single record. I go one step further and create fields which only that one file uses. The key field in the Global.fp3 file has only one record which contains the unique key. This way the master file can see only one record in the global file. Since the fields are regular fields and not global fields, they can be changed and the changes stick. Since the master file can only see one record, it can only make changes to that one record. I have step by step instructions for this process (I typed up the instructions for myself so I could be sure to use the same process everytime) and would be happy to email them to you. Email me directly if you wish to receive them.

HTH,

Keith Parker

Link to comment
Share on other sites

This topic is 8769 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.