Jump to content

Accessing a Global Field in Another File.


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

Recommended Posts

Is there an easy way to access a global field in another file?

I have tried various Relationship tricks but they are fragile.

For example, I have created a global in the current file, filled it with a value I know will exist in another file and set a relationship on the match. Unfortunately this can break down in a number of ways. If the global match field loses it value, or the external file has no records, or at a later date I change the external file so the it doesn't contain that value, the connection is lost.

Any ideas?

Link to comment
Share on other sites

Instead of using global fields, use a calculation field ="1" (or some other simple value) in each file. Use this as the basis for your relationship. (Search this and other forums for discussions of "constant relationships") This still will not work for a file with no records, you'll need to make sure there is always at least one record in every file.

Link to comment
Share on other sites

create in both databases a number field called "one". In the auto-enter options select "Data" and fill it with the value 1.

So every record on both databases has this field filled with the value one. Now You can create a relation with these fields as keys.

If you have already records, you have to fill the 1 with the replace.

For me, this field is a standard in every db, like the ID. It solves many problems, e.g to access globals through several db's

Gerd

Link to comment
Share on other sites

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