Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

hi,

i have a hosted fm pro db which i host out using FM Server.

the problem i have is that when a new record is created a script to create a unique ID updates a global field by adding 1 i.e goes up in incraments of 1. what happens is that once the user closes out of the db and re-opens it to create a new record (record ID) the global field changes back to the original number.

Can anyone help please or come across this before?

Posted

Hi

Do a search for Global fields (All Forums) and you will find that this topic has been discussed often in the past. Basically, Global fields are local to the user in a served environment.

HTH

Lee

Posted

Ricardo:

Unfortunately a global field is no good for what you want to do, at least not in an FM Server environment.

This is a quirk (or a feature, depending on your view) in FM Server. The global field reverts to whatever its last value was when the database was last opened with FMPro in a single-user environment. In other words, if you shut down FM Server, open the database locally on the server machine with FMPro, delete the contents of the global field (or set it to whatever you'd like its default status to be) and then close the database & restart FM Server, the global field would be reset. But, you see, for what you want it to do, it will still always revert to some specific value (i.e., "1" for example) and thus is the wrong solution.

-Stanley

Posted

The workaround in this situation is to create a single record global file for all data that you want to be truely global. Create regular fields in this file instead of globals, and then access them via a constant relationship from the other files.

Posted

I've solved it by:

Setting serial field (global field) as a number fied. every time a new record is created, the records are first sorted by the serial num field and then go to last record step used and a new record created . then using the insert from last record it inserts the last records number from the serial field and then using an insert calc result i simply use the sum + 1 to the serial field and it works :-)

Posted

... and when you get 10,000 records in the database the sort is going to take thirty seconds to complete. (A summary field might work intead, but it too will take time to calculate.) User's will hate it. It could also break if there is a found set. The more I look the more potential problems I find. Sorry.

Implement the Preference file, like Bob suggested. You'll never look back.

This topic is 7680 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.