3 Replies Latest reply on Dec 11, 2013 9:35 AM by philmodjunk

    Help importing ONE file into MULTIPLE records

    Mingrl88

      Title

      Help importing ONE file into MULTIPLE records

      Post

           Hi All,

           I am trying to import a pdf file into about 50 records. Since it takes a lot of time to import one record at a time I thought maybe there was a way I could take the single file and import it into all 50 records? I know how to batch import for images but the issue is that I don't have 50 copies of different files I want to import like you would for images, in one folder, it's just the one file on my desktop, and I'd like all 50 records to have it imported into them. 

            

           thanks!

        • 1. Re: Help importing ONE file into MULTIPLE records
          philmodjunk

               Import the PDF once into the container field of a single record. Then link this record to all 50 records of your current table in a relationship.

               That's the basic concept behind a relational database--use relationships to link to the same data so that you don't have to create multiple duplicates of  the same data.

          • 2. Re: Help importing ONE file into MULTIPLE records
            Mingrl88

                 I think I am missing something. So the container field I am talking about is in a portal on each of the records because it's actually belonging to another table all together. That table is linked to the main record table through a unique ID (so each record could have a different file if I wanted that). 

                  

                 I attached a pic so you can see what I mean. The ERD is highlighting the table with the container and the layout is showing the portal that contains this container. They are connected by the unique ID. 

            • 3. Re: Help importing ONE file into MULTIPLE records
              philmodjunk

                   What I can't tell from your screen shot is whether Documents Table RP::_ID uniquely identifies a record in the Documents table or your layout's table.

                   But it doesn't really matter because this appears to be a many to many relationship. A record in your layout's table needs to be able to link to many Documents and a record in your Documents table may need to link to many records in your layout's table. (Your Screen shot doesn't show the name of your layout's table.)

                   A many to many relationship would be implemented with these table occurrences and relationships:

                   Layout-----<Layout_Document>-----Documents

                   Layout::__pkLayoutID = Layout_Document::_fkLayoutID
                   Documents::__pkDocumentID = Layout_Document::_fkDocumentID

                   You can place a portal to Layout_Document on the Layout layout to list and select a Documents record for each given Layout record. Fields from Documents can be included in the Portal to show additional info about each selected Documents record and the _fkDocumentID field can be set up with a value list for selecting Documents records by their ID field.

                   So you would insert the PDF once into Documents, but you would create records in Layout_Document to link your "50 records" in the Layout table to that newly inserted PDF.