5 Replies Latest reply on Dec 14, 2012 10:19 AM by philmodjunk

    Find record from 2 different table



      Find record from 2 different table



           In layout A , I must found record from layoutA::tableA and layout B::tableB.

           From 2 different layouts and related tables, I must perform find for all records with provided find criteria.

           Is it possible to have a boutton C in the layoutA from the table A that display all found records from 2 differents tables Using the layout A ??


        • 1. Re: Find record from 2 different table

               It's not impossible to do. In many cases a portal with either a relationship and/or a portal filter expression that uses that same criteria can be used to display records from Table B on your Table A layout.

               But you won't be able to display records from two different tables in the same exact list or portal.

               If you have FileMaker 12, you may be able to use the ExecuteSQL function to produce such a list using a UNION query.

          • 2. Re: Find record from 2 different table

                 Hi Phil ;

                 Im using filemaker Pro 11 advanced , and I created a boutton with a script in layout A wihch allow user to go to the layout B and display record finding in this layout .


            Enter Find Mode[Restore]

            GoToLayout [ " Layout B " ( TableB)]

            GoToRelated Reord [ "Show onlu related records; Match found set from table: "Table B"; Using layout <current layout> ]


                 When I want to change the <Current layout > by <Layout A > ; It's not possible to do that , filemaker don't allow me to select layout A to display found records !!

                 How I shoud change my script and what function can I use to display record in layout A with records from Table A and Table B ??



            • 3. Re: Find record from 2 different table

                   Your script makes no sense. You shouldn't enter find mode and then try to do a go to related records step. You might use criteria to perform a find on Layout B after your change layouts, or you use Go To Related Records from Layout A to pull up records on Layout B from Table B that are related to the current record (or found set of records) in Table A. But you wouldn't do both in the same script like you have.

                   Can you describe in detail what you want to have happen on table B? What criteria is being used?

              • 4. Re: Find record from 2 different table


                     Thank you Phill ;

                     I found an other why for my solution ; also I need to your help ..

                     In the same layout , I will make a buton with a script that allow user to save record but No to change existing record ; for exemple:

                     I have a Car " Golf6" , "White", "120Ch".... and I modify this record by adding some record like , "Pirce=20.000$", ... 

                     What I want to do is: when I press the boutton , I save a new record with all data  ( some think like save-as) ; I keep my old record and I make a new one wich contain :  " Golf6" , "White", "120Ch" "Pirce=20.000$". Whell as result , I perform a find by the criteria of " White" , I will have 2 . 

                     After that , I want ( for my new record ) to add samething to the name , and he wil be "Golf6_Archived").

                     how can I do this save with not changing the original one ???

                • 5. Re: Find record from 2 different table

                       Use the duplicate record menu option or script step.