data fill from one table to another

General Information about upcoming products, upgrades, etc.
Posts: 5
Joined: Wed Nov 09, 2005 12:53 pm
PostPosted: Wed Nov 09, 2005 1:00 pm
I am really new to FM and would appreciate any help I can get. Here is my issue.

I have two tables Company & Registration.

I want my data enrty person to take a registration (if the company is already in the company table then look-up from company table - THIS PART WORKS) however if the company is not in the company table then I want the user to fill in the company data in the registration form and have the data fill the company table. How do I do this, I got the look up part to work fine if the data is already in the comapny table however if it is a new company then I need the company table to populate, and I cannot figure it out at all. PLease help. Thanks :roll:
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Thu Nov 10, 2005 6:01 am
Hi. There are a lot of ways to accomplish this. For starters I'd suggest you check out "Allow creation of records in this table via this relationship." This is a checkbox in the FileMaker relationship graph that can let you create a related company, for instance, by simply typing the company name information into the field where the related company name would show up.

You can find an overview of this in FileMaker's built in help here:

Contents > Working with related tables and files > About the types of relationships > About single-criteria relationships

Note that this probably means showing the related company name *directly from the related company record* instead of as a lookup. By placing the company name field you looked up from directly on your registration layout, you can edit company names on the registration layout (a good or bad thing, depending on your prerferences) and create related companys by simply typing their name into this field. Selecting exiting companies would be done as you do now: whetever method you have for setting the company ID into your regsitration table sounds like its working.

-----

For a completely different approach, you can download the free version of CC Time and check out how we let you select an existing client or add a new one. New clients are simply added to the portal from which you select clients, then added to the time filter as if they already existed. Pretty simple approach; you can see a screen shot of this here or download CC Time to see how its done.

Hope that helps.
John Sindelar
SeedCode
Posts: 5
Joined: Wed Nov 09, 2005 12:53 pm
PostPosted: Fri Nov 11, 2005 1:09 pm
Thank you for your help. I went and download the software and will review it. As per your first option, I have it set so it will add the data to the realtionship table, but for som reason when I add a new record into the registration table and I come to the company field, the look up work and if the company already exists it displays the correct data (address and phone , ect) for that chosen company, but if is not on the list and I add the data (company name, phon, address, ect) in the registration table it Does Not add it to the company table with the related fields. It is killing me as to why it doesn work. I am pretty good with database creation and administration, but FileMaker is really blowing my mind, and making me feel like I cannot accomplish this task.
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Sat Nov 12, 2005 5:02 am
mchapman wrote:FileMaker is really blowing my mind, and making me feel like I cannot accomplish this task.


I'm sure you can.

Beside that lookup of the company name on your registration layout, add the actual company name field from the related comany table. For registrations that have a companyid linking them to a company you should see the company name just like you do with a lookup (with the added deafture that you can edit the company name right there and have it update the company's record). Now create a new registration and type a new companny's name into this actual company name field. If you have the "Allow Create of Records..." checkbox checked on the company side of this relationship in the graph you'll have create a company record as you did this.

Hope that helps,

John
John Sindelar
SeedCode
Posts: 5
Joined: Wed Nov 09, 2005 12:53 pm
PostPosted: Mon Nov 14, 2005 5:15 am
Do the tables need to b linked by a field other then the one if the fields I am trying to input. For instance if my primary id is the company name will that matter?
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Tue Nov 15, 2005 5:40 am
Yes. You should create a unique identifier for your companies that is NOT the company name (an auto enter serial number works well). This will isolate your relationships from renaming/misspelling company names. It will also make this create-related-records trick simpler.
John Sindelar
SeedCode
Posts: 5
Joined: Wed Nov 09, 2005 12:53 pm
PostPosted: Tue Nov 15, 2005 6:14 am
thanks I will reorganize my company table with an auto incr uniq and then try it again.
Posts: 5
Joined: Wed Nov 09, 2005 12:53 pm
PostPosted: Tue Nov 15, 2005 6:27 am
I added the uniq auto key in my company table it did not work, I recreated the relationship , it did not work, I made sure that it is set to add the data, and it still does not work. When I am creating a new record in the registration table (adding company data) it is not populating the comapny table, Is there anything else I could be doing wrong or could be missing?
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Tue Nov 15, 2005 7:32 am
This can be tough stuff to write / talk about in the abstract. If you'd like to email me your file (john at seedcode.com) I'd be glad to take a look at it.
John Sindelar
SeedCode

Return to FileMaker Products (General)

Who is online

Users browsing this forum: No registered users and 2 guests

cron
(855) SEEDCODE
[email protected]
Follow us: