3 Replies Latest reply on Nov 13, 2014 1:23 PM by philmodjunk

    Copy conditional number of multiple records between two tables in the same file

    ultranix

      Title

      Copy conditional number of multiple records between two tables in the same file

      Post

      Intro. I have a database file of audio books, where the BASE table contains author, title, year, genre values. Child table TRACKS contains id_book (to which it relates to BASE), filename, track length.

      Previously I only parsed .pls list (topic parse text from playlist) and added tracks in ACTION table only when I listened to it.

      Now I want to add really change the setup, because TRACKS should only contain what it's supposed to - audiobook's filenames and track length's. ACTION table should track when I listened to particular bunch of tracks.

      Idea. I have "Create Event" layout, where I place date, book (drop-down list from all books), and, track_start (drop-down list from all tracks from that book) and track_end. So, if I enter that I date: 2014-11-08, book: Seth Godin - Purple Cow, track_start: CD 01/Track 07.mp3, track_end: CD 02/Track 04.mp3, it would copy all the filenames starting with CD01/Track 07 and ending with CD02/Track04 with the date of 2014-11-08 to ACTION table, so I would track how many hours of audio books I listened.

      Or is another option - joined table between TRACKS and ACTIONS more reasonable?

      Either way, I don't know how to do it. So if someone could explain it, it would be great.

        • 1. Re: Copy conditional number of multiple records between two tables in the same file
          philmodjunk

          The most straight forward way to copy a group of records from one table to another--doesn't matter if tables are in the same or different files, is to perform a find or use GTRR to bring up a found set of the records to copy, then use Import records to copy them.

          • 2. Re: Copy conditional number of multiple records between two tables in the same file
            ultranix

             Could you share more details/exact steps, because if it was easy for me, I wouldn't have posted this topic.

            • 3. Re: Copy conditional number of multiple records between two tables in the same file
              philmodjunk

              Import records is documented in FileMaker Help. I figured you could follow those instructions.

              Bring up your found set in your source table. This can be a performed find or with a Go To Related Records script step. If this table is in a different file, leave the file open and switch to your target file. This be part of an Import Records script.

              If this is manual import select a layout based on the target table and choose import records from the File menu. If this is a scripted import, set up your import records step to import records from the source table. If the source table is in the same file as the target table, you go through the same steps to select the source table as you would if the file is from a different table. you just select the file you already have open.

              For both a manual import and a scripted import, you then need to set up the other options for your import, mapping fields from the source table to the target table as well as selecting other options. Sorry not to be more detailed, but there are a lot of options here to choose from and the right ones depend on the design of your tables and what exactly you need to do with your import.