4 Replies Latest reply on Apr 23, 2015 9:35 AM by philmodjunk

    Issues with entering lists of information in tabs in my database

    GabiMatias

      Title

      Issues with entering lists of information in tabs in my database

      Post

      I am certainly a novice when it comes to filemaker, and I am working in FileMaker Pro 12 with my database. The issue I am having is that I have one layout with 3 tabs. Contact info, Samples, and Sales. I have only one table in my database. What I am needing to accomplish is to have in my Samples tab, 3 fields- date sent, texture, and sample number. The issue I am having is that for all of Date Sent fields, every time I put in a date, it puts that same date in every Date Sent field. What can I do, if anything, to avoid this?? 

        • 1. Re: Issues with entering lists of information in tabs in my database
          philmodjunk

          That's because you have placed multiple copies of the same field on your layout and thus each field shows the same data from the same field from the same record. You cannot use the field tool to add fields to the database table that underlies your layout.

          You need to research portals and related table. What you describe should be handled by setting up a new table linked to the original where you define your three fields. You then put a portal inside your tab control to list and record your samples data.

          • 2. Re: Issues with entering lists of information in tabs in my database
            GabiMatias

            Thank you- that's very helpful and I have begun to develop my 3 tables and the relationships within, but currently the issue I am having is that Ive got my samples layout, and a portal setup in my samples tab in my customers layout. But in the portal, its not showing the multiple samples sent to that one customer, but it is however showing the multiple records in my samples table, which defeats the purpose of having a portal in the first place

            • 3. Re: Issues with entering lists of information in tabs in my database
              GabiMatias

              Do I have to define a lookup for each relationship I've got?

               

              • 4. Re: Issues with entering lists of information in tabs in my database
                philmodjunk

                You don't need a look up. You do need a relationship and for a record in samples to show up in a portal, the match fields defined for the relationship have to hold matching values.

                I'm going to make some stuff up here that may not match your actual set up in order to supply enough detail for an example.

                Say you have two tables: Patients, Samples and you want to use a portal on the Layout for Patients that shows all samples taken from that patient.

                a) define a field in Patients that auto-enters a value that uniquely identifies each patient. Create a number field named __pkPatientID, click options to open field options and specify that it auto-enter a serial number.

                b) define a number field in samples named _fkPatientID. Do not specify any field options.

                c) in Manage | database | relationships, use your mouse to drag from __pkPatientID to _fkPatientID in order to define a relationship linking the two tables by these ID fields. These are your match fields.

                d) Double click the relationship line and click the "allow creation of records via this relationship" check box for Samples. This is not required in order to set up your portal, but it keeps using your first portal simple.

                e) go to your Patients layout and enter layout mode. Use the portal tool to add a portal to the layout and select the fields that you want inside that portal row. Whether you select any specific options in Portal setup other than selecting Samples from the "show related records from" drop down won't matter for this example and you can return to portal set up for this portal and try out different 0ptions later.

                f) enter browse mode. Make sure that you have at least one Patients record in your current found set. You can choose new record if you want to start with a new patient record for this example. Now try entering data into the fields in the portal. Because we clicked "allow creation..." each time you enter data into the empty fields of the bottom "add row" of the portal, FileMaker creates a new records in samples and copies the value of __pkPatientID of your current record to the _fkPatientID of this new record in samples.

                This is not the only way to create new records in samples but note how it makes sure that the _fkPatientID field gets the correct matching value to link it to a record in Patients.