Jump to content

Going to All Related Records from a Big File


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

Recommended Posts

I have a master file of companies and a related file of employees. How can I go to the related employees of ALL the companies in the found set of the master file?

My problem is that the master file is large, 10K records or so and will grow.

In most cases I would set up the following:

1) Go to a layout in the master file that contains only the Company ID number.

2) Copy all records

3) Go to a layout containing a global field that will act as a temporary match field to the Company IDs in the Employees file.

4) Paste into that global field

5) Go to related records in Employees (via the global field).

That has worked wonderfully in the past. However, with a master file of potentially 10-20 thousand records, would this method not run into the problem of 64,000 allowable characters in a field?

How do I get around this? Is there a much better way?

--Thanks,

Dave

Link to comment
Share on other sites

The only other way I can think of would be to loop through the found set of companies and go to the related employees of each one, marking the found set of related employees. When the loop is finished, go to employees and find all marked records.

Since it's a multi user setup, have three fields: gCurrentUser which is a global field that is unique for every user on the network, Mark, which is a number field that you actually mark, and gloalMark which is a calculation field that is set to the gCurrentUser if the Mark field is marked. Then search the globalMark for the gCurrentUser to find the related records.

Chuck

Link to comment
Share on other sites

Interesting idea about how to mark the employess. Only thing is, using that original Mark field would still necessitate that other users not be editing any of the desired records --or using the Mark field themselves. At least I believe this is so.

Any other ideas?

Thanks,

Dave

Link to comment
Share on other sites

Let's see. Instead of using a mark field with a value of 1 or 0, use a text field. You still have a global field with the current user's name (must be unique). To mark the field with the user's name, set it to:

Case(

Link to comment
Share on other sites

quote:

Originally posted by Dave Bud:

However, with a master file of potentially 10-20 thousand records, would this method not run into the problem of 64,000 allowable characters in a field?/B]

Will your found sets be that big? I cannot imagine them being that large, if so, you should be doing your finds in the employee file.

Assuming that you have an ID that is somehow unique (say Name or Number) and it is 10 characters (10 bytes). You can have 6400 in your found set without running into the problem.

Now if you think that this is the case, then perform these finds directly in the employee file, or save the find criteria into some globals so that you can run the same find in the employee file.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

Link to comment
Share on other sites

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