Jump to content

Help a newbie understand relationships


kirsh
 Share

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

Recommended Posts

  • Newbies

I'm new to databases. I've modified the given "contacts" file just a little. Now in another db I'd like to be able to view (not lookup) the info from contact by entering one of the fields (most likely last name or phone #) and having all of the info brought into view in the new records.

I began trying to set-up a relationship but it seemed to not be correct. No doubt this is not a new question but I was unable to find an overview or sample step-by-step as I browsed.

Thanks for any help

Kirsh

FileMaker Version: 6

Platform: Mac OS X Panther

Link to comment
Share on other sites

The best place to start would probably be the tutorial in the Getting Started Guide. This should be a pdf in your Filemaker Application/Electronic Documentation folder. There should also be a Filemaker Tutorial Folder with example files. The chapter on relationships is Lesson 10

Link to comment
Share on other sites

Hi and welcome to FMForums.

You said you don't want a lookup but then you asked for this contact "ID card" to be shown for new records. So I'm a bit confused.

It seems what you want is a way to view a contact info without moving to the contacts file.

If so, what you could do is add a global field in your file, and build a relationship from this global to the Contact ID in the Contacts file.

Then you could drop related fields from this relationship on the layout.

You just need to find a way to enter this ID in that global field.

Tell us a bit more.

FileMaker Version: 6

Platform: Mac OS 9

Link to comment
Share on other sites

  • Newbies

Let me try to explain a bit. I reviewed the tutrials etc yet still must be missing something in setting up relationships for the first time.

In my master file, I'd like to enter a last name for instance and have the remaining fields in the record fill-in the corresponding data from a related file (in this case called contacts). I believe I've determined since there is only 1 related file I do not need a portal.

If it helps, the master file records are each unique listings of rental properties. I have 3 tabs on the layout (description, contact/billing, pictures). The contacts in the related file are the owners, who in some cases own multiple units.

Link to comment
Share on other sites

It definitely looks as lookup for me, except you wouldn't be accurate enough to have the fields autmatically filled based on the Last Name which is far from being a unique identificant.

So you may use portal, even if it is one file only, to have your list shown, and then either pick the corresponding name or have it looked up automatically.

Have a look to the "Type-Ahead" or "Clairvoyance" tools posted here in the Sample section.

FileMaker Version: 6

Platform: Mac OS 9

Link to comment
Share on other sites

Kirsh:

Actually, I think you're better off using the telephone number, as it is (if you include area-code) a unique number. So, to follow on to the other suggestions, put in a global field (where you'll type the telephone number) and create a relationship to the Contacts db where your new g_Tel_Number=Contacts:Telephone_Number. Then put in all the related fields you want to see (name, address, whatever) in your layout. As soon as you've put in a correct number, the fields should automatically populate themselves.

-Stanley

Link to comment
Share on other sites

  • Newbies

Stanley,

Sounds exactly like what I want to accomplish. I've checked out the samples and other description but am so new to relationships that I'm fumbling on actually setting up the relationship. Not sure what steps to take. If anyone could take a look at the files that I'm including and help I'd appreciate it. I want to populate the "billing" tab in "TogaRent" based on the phone number. The rest of the contact info is in "Contacts".

TogaRent.fp5.zip

Link to comment
Share on other sites

Kirsh:

The relationship you want to use is "Phone1" for everything. So, in your TogaRent database, wherever you want to put info from the Contacts db, double-click on the field in question, pull down to the "Phone1" relationship and select a field from the Contacts db. Because you've got the phone number already entered (and that field should stay exactly the way you've already got it), any data from the related file should appear automatically...

-Stanley

Link to comment
Share on other sites

What if the phone number changes? It's not a good idea to use names, phone numbers, addresses, zipcodes, or any other variable data as a key field. Much better to use a unique serial number that has no innate relationship to the data, so that it never changes.

Link to comment
Share on other sites

Kirsh:

Queue is of course correct - the telephone number is not really the right way to do it, and you're best off using a serial number at the heart of your relationship. Once you've got the method down in the first place (i.e., how relationships work), you can switch to using serial numbers. However, for the simple function you requested, the phone number will work (so long as, as Queue points out, the number never changes.)

-Stanley

Link to comment
Share on other sites

  • Newbies

These suggestions have been wonderful, thanks. Queue, you make a great point. I'm trying to include a unique serial to pull everything together. Stanley, your message was a clear direction that led to success. Previously I had been creating new relationships for each field not understanding that the 1 single relationship was used as reference for all fields.

After a week of frustration, I'm back to productive work on this project.

Link to comment
Share on other sites

This topic is 6495 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
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.