Here is the simplest approach:
You need two tables with this relationship:
Customers::__pkCustomerID = Samples::_fkCustomerID
In Manage | Database | Relationships, double click the relationship line linking these two table occurrences and select the "allow creation of records via this relationship" option for Samples.
Now go to your Customers layout and add a portal to Samples on the layout.
You can record as many samples as you need simply by entering the data into fields in the portal rows. Each time you enter data into a blank bottom row, FileMaker will create the needed related record for you.
More sophisticated approaches are possible, but all are based and this basic data model.
For an explanation of the notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained
Hi, and thanks for answering.
The portal is working fine, i can punch all the samples in the portal and i choose the client, date and so on outside the portal.
Anyhow, the portal shows me the samples i recorded last time i recorded anything on this client as well, and by time there will be many thousands samples. How to just get it to start fresh on when i make a new record in the "main" table, and then register my 10-15 samles connected to this day?
Thanks in advance for answers :-)
You have many different options possible. Here are two, but they are far from the only options possible:
Add another table: Customers----< Days ----<Samples
From a layout based on Days, you can see the samples for a given customer recorded on that given day.
Filter your relationship by date:
Customers::__pkCustomerID = Samples::_fkCustomerID AND
Customers::SelectedDate = Samples::Date
Then you can select a date in SelectedDate to see and record samples for that date for that customer.
im not shure if I got it properly.
1. New table with days only inside,OK
2. Layout based on days? (So then the portal only shows the values for this day, e. None then?)
3. I guess I'll figure out the filter-function.
PS; this layout is mostly for registering samples upon arriving, the report I'll do in another step later on :-)
The second option is probably simpler to set up. You can even make the added date field a global field so that you can select the date once and then change from client to client without needing to also change the date each time.
Im sorry, but this was not exactly what i meant.
I make a new record, and then i choose the customer. The date is added automatically. The point is that when i do choose customer X, the samples customer X made last week is showing up in the portal. I just want it to be empty fields you see. Kind of just make new records in the table in the portal, but not show the previous records for the customer.
That won't happen if you include a date field as an additional match field in the relationship. Then you will only see those records for the current customer for the current date.
But here's a simpler way:
Define a new field in your table to auto-enter a serial number. This will provide a unique value for every record in your main table--what we call a primary key. Use it as a match field to Samples and this problem will no longer occur for new records in your system.
It worked, thank you!
Now ill just have to play a little bit more, 99% shire i will get more troubles along the way, so its great to have someone to ask!
(i do have a older mac, which does not handle Filemaker 13, is there still a 12 available, and will it handle the 13 files?)
You'd have to contact FileMaker Sales and ask to see if you can get a copy of 12. FileMaker can handle up to 50 files open at the same time. I used to have to have scripts close some files before opening others until I got a bunch of them merged into a single file. (They were created in an older version back when a single table to a file was the only way you could set up a system of related tables.)
The table for registering the sample now works fine. Now its getting to the registering of the results.
I do have the table "samples" where i do have the fields mentioned above, and i now want to make a layout for registering the results.
I just want the table to show tree values, the time when the read off was done, the sample-ID which i do fill in myself, and the value.
I did make a layout with a portal for this, with a portal inside which shows me the fields mentioned above, but when i do exit the layout mode, the fields i want to fill is not showing up, and its not possible to make new records. Probably just a small bug, but i can't font it (quite new to filemaker still)
Did you add these fields in a new table or as additional fields in your samples table?
Is there only one such entry per sample or are there multiple results to record for each sample?
Wow, fast answer!
yes, only one result per sample.
i did add theese fields to the original table.
Then you'll need to describe how you set this up on your layout. It sounds like you have an issue with either the table selected for the layout, for the portal or the fields added to the portal are from the wrong table occurrence.
Ive now started on a fresh new, and its working OK, exept that when i do write the data in to the table inside the portal and then make a new record, the data I've just pushed disappear, and are not longer a part of the record.
I do have two tables.
-Recieving samples (ID, customer, received date)
-Sample-data (ID, fk_ID, date recieved, read-off value, read-off date, sample-type, completed, and sample ID.
I have three layouts, one called "reciving samples", "read-off" and "sample-data"
The tables are connected with realtionships between Jnr and fk_ID, and a realationship between "date received and fk_date received"