6 Replies Latest reply on Jun 24, 2009 7:15 AM by Lonny

    Merging related records into a text field

    Lonny

      Title

      Merging related records into a text field

      Post

      Hi!
      I need to organize a record collection. I have 2 related tables: Albums and Tracks. Each album has a catalogue number, used to relate tracks to albums. Moreover each track has values such as "performer", "title", "time", as in the example below:



      Album 1    - CAT 1 - track 1 (performer 1, title 1, time 1)

                      - CAT 1 - track 2 (performer 2, title 2, time 2)

      Album 2    - CAT 2 - track 3 (performer 3, title 3, time 3)

      Album 3    - CAT 3 - track 4 (performer 4, title 4, time 4)
                      - CAT 3 - track 5 (performer 5, title 5, time 5)
                      - CAT 3 - track 6 (performer 6, title 6, time 6)

      (table "Albums" has 3 records and table "Tracks" has 6 records)


      For each Album I need to define a text field containing the playlist, meaning that the output file will have to merge data from the related records and look something like:

      "Album 1 (CAT 1) : track 1 (performer 1, title 1, time1); track 2 (performer 2, title 2, time 2)"

      I am thinking about making a script to go to related records, using a loop... but I really help some guidance.
      Thanks in advance