6 Replies Latest reply on Aug 17, 2016 8:27 AM by philmodjunk

    Can't display (borrow) data from parent table

    goldencode

      Hi, everyone

       

      Let me start directly

       

      I have two tables the parent table has primary key called _pk_customer_id and the child table has a foreign key called _fk_customer_id

       

      I have linked the primary key to the foreign key so the relationship is created. Now the parent table already contains data about customer's name, address, email..

       

      In the layout that shows records from the child table, i have added these fields: name, address, email.. and they are set to display data (borrow) from the parent table.. when i perform "find" using for example email address, i get a message saying that there are no records match!

       

      What's wrong i'm doing with the relationship between the tables?!

        • 1. Re: Can't display (borrow) data from parent table
          coherentkris

          Is your find criteria correct? Did you enter a value that you know exists in parent name?

          Are you executing the find from the correct layout context? should be performing the find from the child layout that is bound to the right child TO.

          Does your child table have records?

          Does your child records have valid FK values to parent?

           

          If you go to the child layout and execute a good find on parent name field it works.

          1 of 1 people found this helpful
          • 2. Re: Can't display (borrow) data from parent table
            philipHPG

            Check to make sure that _pk_customer_id (in the parent table) and _fk_customer_id (in the child table) are both of the same type (text or number).

             

            Also, are you sure that the _fk_customer_id fields were populated with the corresponding value from the parent table? If the child records were created in a portal from a layout based on the parent table (where the "Allow creation of records in this table via this relationship" was selected) then this would be done automatically. However, if you create records manually in a layout based on the child table, you have to manually set the _fk_customer_id value.

            • 3. Re: Can't display (borrow) data from parent table
              goldencode

              I will follow the instructions you have provided and check what i'm doing wrong

               

              I will keep you updated

               

              Thanks a lot!

              • 4. Re: Can't display (borrow) data from parent table
                goldencode

                This sample makes it easier to find the problem in a small scale, this is really appreciated!

                • 5. Re: Can't display (borrow) data from parent table
                  DrewTenenholz

                  Dear Goldencode --

                   

                  As other have mentioned, you have to have child records to search for and they have to be linked to the parent table properly.

                   

                  But there's another slightly strange thing that could be going on with the search, the @ character in email addresses. 

                   

                  FileMaker treats the "at" character as a wild card in searches, and uniformly fails when you search for the string "my_email@domain.com" (without quotes).  You can get around this by typing "my_email\@domain.com" (again without quotes) as the search criteria. That little backslash tells FileMaker, "no, I don't want the wild card @ symbol (any one character), I want you to find an actual @ symbol.  The backslash works for all sorts of 'special' characters, including the double-quote and anything you see in the 'operators' menu when you are in Find mode.

                   

                  It is a matter of some puzzlement to me that when using the @ without the backslash, you'd think it would mean any one character, but apparently not the one character that would be useful, the @ character itself, but this behavior has been consistent over many versions now.

                   

                  Your mention of searching an email field made me think this might the issue you have.

                   

                  -- Drew

                  • 6. Re: Can't display (borrow) data from parent table
                    philmodjunk

                    You can also include your search text in quotes to keep characters such as @ or # from being treated as search operators.