2 Replies Latest reply on Jul 3, 2012 10:55 AM by comment

    Repeating fields, lists, et. al.

    barenose

      I'm converting an old file with several repeating fields. I'm trying to split these into separate records while matching the correct values in each record.

       

      For example,

      One field is Mon, Tues, Wed, etc.

      Next is A, B, C, D etc.

      Finally there's Orange, Yellow, Blue, Green

       

      There are five values in each repeating field, but not all the values are applied, i.e.

       

      Record one could be Tues, C, Green

      Record two might be Mon, A, Orange

       

      and so on.

       

      I've tried using the List () to get the values in one field and then the GetValue (field;x) to identify the correct values in the following fields. I keep getting a List of all the values in the resulting fields.

       

      Any help is appreciated.

       

      All the best,

       

      JB

        • 1. Re: Repeating fields, lists, et. al.
          erolst

          If you want to use a looping script to create child records, use GetRepetitionNumber ( myTable::myrepeatingField ; $counter ) with the loop counter as second parameter to get the values of the individual repetitions; only create a child record if the value of the current repetition is not empty.

           

          Bracket notation also works: myTable::myrepeatingField [ $counter ]

          • 2. Re: Repeating fields, lists, et. al.
            comment

            barenose wrote:

             

            I've tried using the List () to get the values in one field and then the GetValue (field;x)

             

            I am not quite sure what you are trying to accomplish. In any case, the List() function will NOT list any empty values.

             

            Why don't you simply import the records into a new table, and select the option to split values in repeating fields into separate records?