1 2 Previous Next 17 Replies Latest reply on May 14, 2015 4:20 PM by jmorrison0722

    move foundset

    malachydevlin

      Hi, I have 2 front end files linking to one back end database.

      IN one of the files (interface) I have a foundset in memory.

      I would like to open the 2nd file (reporting file) and bring the same foundset to it.

      I was thinking of looping through all the record IDs first and then finding them again in the 2nd file but not sure if there is an easier way..

       

      thanks..

        • 1. Re: move foundset
          brsamuel

          Depending on the size of the found set, that is not necessarily a bad idea.  If you persue this idea, a faster method for assembling the list if record IDs is to add a Summary field to the table using the FileMaker 13 ListOf summary type, based on the table's unique ID.

          • 2. Re: move foundset

            FileMaker has a method of capturing the ids of a found set and letting you send that to another user/computer and then use that information to open the exact same set of records minus of course any deleted records in the interim.

             

            Start with the help file and Snapshot Link.

             

            I have not used this more than to test how it works but will probably do so in the future in a current project. What it does it captures the ids (or something) of your current found set and lets you package that and email it to someone else of save it in a record (maybe?).

             

            What I found was that when clicking on the link in an email it would do all of the work such for me. Try it. You'll like it.

            • 3. Re: move foundset
              rivet

              I might grab the found list with a custom function like FoundList

              then set it to a global or text field that has a relationship to the date in the 2nd file

              then run a script in the 2nd table the will goto relationship

              • 4. Re: move foundset
                LSNOVER

                The Summary List function should be a faster way of getting the values.

                 

                If I recall, the fastest way to get a list of ids, is to go to a layout with JUST the ID field you want, and then use the Copy function.   You can then paste into a Global field and use a relationship to bring up the values. 

                • 5. Re: move foundset
                  wimdecorte

                  jackrodgers wrote:

                   

                  Start with the help file and Snapshot Link.

                   

                   

                   

                  Won't work without going through extra hoops to modify the snapshot link file.  The snapshot also embeds the file name and the layout name so you can't use it to get the same found set in another file in another layout.

                  • 6. Re: move foundset
                    techt

                    Do the records exist in the second file? In the past, we've added a "found" field that can be set for a found set, then open the second file and search for those records that have been tagged.

                     

                    If you're trying to move or duplicate the found set of records into the second file, then a relationship and loop through script will move or copy (depending on how you set it up) will get those records to the second file.

                     

                    Not sure if this is what you're after, but I read your question a little differently.


                    HTH,


                    Tim

                    • 7. Re: move foundset
                      malachydevlin

                      Thanks all, I have the first part of this going now and have a variable (or global field) with a list of IDs

                      e.g:

                      1

                      3

                      5

                       

                      So in the 2nd file I need to simply find all the records (customers) with an ID belonging to the list above, it doesn't seem to be as simple as I expected.

                       

                      using SQL I would have simple said select * from customers where id IN (1,4,5,) etc.

                       

                      not sure how I can find the records via scripting with this list.

                      • 8. Re: move foundset
                        techt

                        Would the executeSQL statement work for you?

                        • 9. Re: move foundset
                          siplus

                          in the second file paste or set a global to contain those ID's.

                           

                          Build a self relationship in the second file, based upon this global and the table's PK.

                           

                          Once the values are in the global, just go to related records, using the relationship and the layout of your choice.

                          • 10. Re: move foundset
                            malachydevlin

                            thanks all, the relationship would work however in the meantime I did a loop of the values and created find requests for each instance then did a perform find at the end.

                            works a treat but a little oddball maybe.

                            thanks a lot.

                            ps I did use brian dunnings function to get the ids (very handy)

                            thanks to everyone for their time..

                            • 11. Re: move foundset
                              jmorrison0722

                              I know you have a solution, just couldn't help chiming in, make sure I'm not crazy...

                              I'm assuming both the front end and back end databases are in FileMaker. If so, here's what I do...

                              Go to front end, search and get your found set. Go to back end and import from front end. When importing, it brings in the found set only...at least that always works for me.

                              • 12. Re: move foundset
                                NickLightbody

                                I think I would just gather the multi value keys for the found set and move that single field of data to inform the second view and redisplay the found set.

                                 

                                Or tag the records and display the tagged records in view 2

                                 

                                Or build a Bruce Robertson virtual list and use that

                                 

                                ???

                                • 13. Re: move foundset
                                  siplus

                                  So you go to your invoices table, find unpaid invoices, then import the client FK from invoices into client table - PK to have the same found set ?

                                   

                                  that's a FilePalm. As in FileMaker ⋂ FacePalm

                                  • 14. Re: move foundset
                                    jmorrison0722

                                    exactly.

                                    1 2 Previous Next