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

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

Recommended Posts

Posted

I have a script that works fine for me but is not working (or at least, part of it is not working) for someone else on a different workstation. Any thoughts on why this might be happening? The script creates a new record and sets a bunch of field values automatically. The part that appears to not be working involves:

a.) incrementing a global variable

b.) concatenating that new value with some other stuff

c.) putting the result into a field in the new record

Everything seems to work except the incrementing. I can't figure out why it works for me but not for someone else. The database doesn't have any security or login restrictions on it. Ideas?

Posted

Globals are specific to each user. In order to have "global" values available to all users, I use a one-record Global table (but don't define the fields as global fields). Relate this Global table to all other tables with an X (cartesian) relationship.

Posted

I use a one-record Global table (but don't define the fields as global fields).

That's not something I would recommend lightly. Especially if the values are meant to be frequently modified.

I suspect this is one of those cases where an auto-entered serial number should be used instead of ... well, whatever it is.

Posted

I see. I also just found this in the Help: "If your file is shared, only the host's changes to global field data are saved. Changes are saved only when the file is closed." So that explains that. It isn't quite how I would have expected a global variable to behave, but there is some logic to it.

You're right that an auto-entered serial number would be more convenient, but the string we want to create actually depends on a different variable, which can have one of two values (i.e. string1_001 or string2_001). Hence my trying to calculate it myself. I may just drop the idea and go with the auto-enter anyway. It creates a different issue down the road, but I think I can come up with a workaround. Thanks for your feedback.

Posted

Global field or global variable? You seem to be using the two terms interchangeably.

Posted

That's not something I would recommend lightly.

I remember reading somewhere that that was the way to do it. Could you explain why you don't recommend it?

--Doug

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