Jump to content

Find on related fields in child record


gman

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

Recommended Posts

Having trouble setting up a find request on a related field in the child DB. Two DB's are involved, Customer Contacts and Valve Repair records. A CustID is the key field that relates the two DB's. One customer record can relate to many valve repair records. The related customer information is displayed, not copied in the valve repair DB.

I'm trying to perform a FIND in the Valve Repair DB on the customer name related field. A layout is presented to the user in FIND mode from the Valve Repair DB. A customer name is entered and the find performed. What I want to display is all of the Valve Repair records that have the particular customer name. Now the find produces no records in the found set. Can this be done? Any help would be appreciated.

Link to comment
Share on other sites

hi gman ...

No need to perform a find.

1. Create a relationship of the CustID field to iteself in Valve Repairs. This is known as a "self-join". Let's call the relationship: "self_CustID"

2. Create a script in Valve Repairs something like:

Go To Related Record [self_CustID, Show only related]

This will assemble a found set of Valve Repair records limited to only those records belonging to the CustID of the active Valve Repair record.

Then, put a button on the appropriate layout in Valve Repairs -- name the button something like: "This Customer's Repairs". Attach your script to it, and you'll be good to go. You might also want to add a script step to go to a list layout so the user can quickly scan through the found set of records.

Link to comment
Share on other sites

Thanks for the quick response. I resolved the problem without knowing what I was doing. I shut the DB down and restarted. To a novice, it seems that the relationships I was working on needed to re-establish on startup. The find in a related field works great now. I do like the idea of a self join and will apply it in a new portion of my ever growing DB. Thanks for the help.

Link to comment
Share on other sites

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