1 2 Previous Next 19 Replies Latest reply on Dec 16, 2013 2:46 PM by philmodjunk

    Making new records related to A spesific other record

    MattisA.Tangeraas

      Title

      Making new records related to A spesific other record

      Post

           Hi!

           i do have This table where I do register all the saples I get from my customers 

           I was planning having one record where I register the reviving of the sample. I've made it so far that I can register the Custer and everything, and the I've made a field "no of samples". Sometime the customer brings one sample, sometimes 20. 

            

           When I write that the Customer delivered ex 5 samples, I would like there to be 5 new records/empty fields that I have to fill before I can pass on. How to set up this?

            

           thanks in advance

        • 1. Re: Making new records related to A spesific other record
          philmodjunk

               Here is the simplest approach:

               You need two tables with this relationship:

               Customers----<Samples

               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

          • 2. Re: Making new records related to A spesific other record
            MattisA.Tangeraas

                 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 :-)

            • 3. Re: Making new records related to A spesific other record
              philmodjunk

                   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.

                    

              • 4. Re: Making new records related to A spesific other record
                MattisA.Tangeraas

                     Hi!

                     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 :-)

                • 5. Re: Making new records related to A spesific other record
                  philmodjunk

                       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.

                  • 6. Re: Making new records related to A spesific other record
                    MattisA.Tangeraas

                         Hi,

                          

                         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.

                          

                         Thanks!

                    • 7. Re: Making new records related to A spesific other record
                      philmodjunk

                           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.

                      • 8. Re: Making new records related to A spesific other record
                        MattisA.Tangeraas

                             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?)

                        • 9. Re: Making new records related to A spesific other record
                          philmodjunk

                               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.)

                          • 10. Re: Making new records related to A spesific other record
                            MattisA.Tangeraas

                                 Hi again,

                                  

                                 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)

                            • 11. Re: Making new records related to A spesific other record
                              philmodjunk

                                   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?

                              • 12. Re: Making new records related to A spesific other record
                                MattisA.Tangeraas

                                     Wow, fast answer!

                                      

                                     yes, only one result per sample.

                                     i did add theese fields to the original table. 

                                • 13. Re: Making new records related to A spesific other record
                                  philmodjunk

                                       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.

                                  • 14. Re: Making new records related to A spesific other record
                                    MattisA.Tangeraas

                                         Hi,

                                         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"

                                          

                                          

                                    1 2 Previous Next