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

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

Recommended Posts

Posted

I hope someone can give me an answer to a problem I am having.

What I am trying to achieve is a serial number script.

I have 4 fields (all global Numbers) 1 field is for leading zeros 1 field is a start number

1 field is a previous number and 1 field is a new number.

I run the serial numbers from a script and they work fine on one computer but when I

network the file the serial number will not update on the server but it will update on the

computer it is being used on WHY?

Posted

You are discovering what global field are all about. Globals can only be used in the manner you suggest in a single user file. In a multi-user file opened by a guest, globals take on the last value stored when the file was single user and are discarded when the guest closes the file. When you think about this in a multi user environment, it makes sense that globals must be made to work this way. Say you used a global for a loop counter, if two users were running the same loop, things would get VERY confused!

To do what you want, you will need to create another file with a single record and store the values as fields in this one record. You must also prevent a couple of things from happening. If a user clicks into this record but does not release it, no other user can use the record until it is released. If user one grabs a value and adds one, user two grabs a value and adds one, user one writes the value back, then user two writes the value back, the value will then be incorrect (+1 not +2). You must script so that this sort of thing doesn't happen in a multi-user environment.

In a multi-user environment, it is important to understand how FM works to avoid problems.

-bd

[This message has been edited by LiveOak (edited January 17, 2001).]

Posted

quote:

Originally posted by MDPRES:

I hope someone can give me an answer to a problem I am having.

What I am trying to achieve is a serial number script.

I have 4 fields (all global Numbers) 1 field is for leading zeros 1 field is a start number

1 field is a previous number and 1 field is a new number.

I run the serial numbers from a script and they work fine on one computer but when I

network the file the serial number will not update on the server but it will update on the

computer it is being used on WHY?

bd

I thought that the global was an issue

thanks, and I did do it the other way

but ran into the problem of another user

being in that record so thanks for letting me know i wasnt going crazy

dean

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