2 Replies Latest reply on Dec 30, 2008 11:47 PM by Musashi

    Moving records into a repeating field by script

    Musashi

      Title

      Moving records into a repeating field by script

      Post

      I am sure that this is a very simple problem with a very simple solution:

       

      I have a layout "Cash Sales" that you record the Delivery No, item, unit price, quanity, etc. If there is more than one item the record duplicates with the same delivery number, and you enter the next item, etc until you have entered all the items.

       

      I have created another layout "Delivery Cash Sales" This will take all the records from "Cash Sales" with the same delivery no and fill in the repeating fiield so you will end up with one record with all the items That can be printed and passed to the customer when the items are delivered.

       

      I have tried to create a script that will take all the items in fill in the repeating fields, but I only succeed at getting the first field of repeating field with the last record.

       

      Anyone have any ideas.

       

       

        • 1. Re: Moving records into a repeating field by script
          Jens Teich
             Using repeating fields for line items is considered very poor style since FM 3. Unfortunately FileMaker itself uses them in the example databases shipped with installation.

          Data inside of repeating fields is sort of lost and these fields have to be avoided until you completely understood the relational model and know where to use relationships.

          So yes the answer is very simple: rethink your whole structure and use extra tables for line items and enter them in a portal.

          Jens



          • 2. Re: Moving records into a repeating field by script
            Musashi
              

            Thank you for the reply.

             

            I am not storing the data in the repeating fields, but simply printing a delivery sheet for the customer. The main data is stored in a seperate table.

             

            I also most have a working script and I will post it later for other people to view.