2 Replies Latest reply on Oct 22, 2015 6:19 AM by jwilson

    Generating a table based on another....

    jwilson

      I have a table with 4 fields:

       

                Name;   # Portions fruit;   # Portions meat;   # Portions Fish

       

      And based on this data I want to be able to generate a Table that has three fields:

       

                Name;  Type of Food;  # Portions

       

      One record in 1st table could thus result in up to 3 records in the second table.

       

      Ideally I want the second table to be populated at the same time as the 1st, but it would also be acceptable to  generate the second table as a one off event (ie triggered by a script).

       

      This looks like a ridiculously easy task but I just cannot see how to make it work and any help would be very much appreciated

        • 1. Re: Generating a table based on another....
          erolst

          jwilson wrote:

           

          I have a table with 4 fields:

                    Name;   # Portions fruit;   # Portions meat;   # Portions Fish

          And based on this data I want to be able to generate a Table that has three fields:

                    Name;  Type of Food;  # Portions

           

          To convert your existing data, you could simply do 3 imports, where after the import you use Replace Fields Contents to set the type according to the field from where you imported.

           

          For future use, just create the required child records in your “Portions” table and set them to the desired type.

          • 2. Re: Generating a table based on another....
            jwilson

            thanks erolst....  this was enough to trigger my addled brain into action, and I have made a script based on your suggestion.  Works fine.