7 Replies Latest reply on Dec 8, 2009 2:56 PM by philmodjunk

    Importing objects



      Importing objects


      I need to import 35,000 records to include a reference to a PDF


      member_number|lname|fname|scan of application



      I want to click on the PDF and have it come up full screen in Adobe.


      I understand that the PDF reference must be in a container, but I don't know how import the reference (which would be something like "../new_members/scans/M1234.PDF)


      I'm a newbie testing this for a customer. I normally use MySQL. Win7/32

        • 1. Re: Importing objects
             Is this a reference to the same PDF or a folder of PDF files which must be linked to different records?
          • 2. Re: Importing objects
               This would be to a folder with 35,000 PDFs in it.  One for each record (member).
            • 3. Re: Importing objects

              That's a challenge. Import Records | Folder was my first thought, but I see that it only works as desired for pictures and text files--not PDF's.


              Does the information in your database provide the necessary data to compute the file path to the specific PDF for a given record? If so you can do this in a script that computes the path and places the result in a variable and then uses Insert File to insert the specified PDF...


              Otherwise, you may want to research plug ins to see if one will fill the gap here for you.

              • 4. Re: Importing objects
                   I can certainly put the path and the file name in the field.  Regardless of what I put into the field, I want to be able to click on whatever it is and have the PDF pop up.  Let me restate the question.  What can I put in a field that will cause a PDF to pop up when I click on it?  I can populate the field with file name, path+filiename or whatever is needed to get the PDF to pop up.
                • 5. Re: Importing objects

                  Yeah, but I assume you don't want to insert each PDF file one record at a time by hand?


                  If you can set up a text or calculation field that accurately reproduces the path to the desired PDF file in the format used by a container field set to "Store by reference", you can use the following script step (inside a loop) or calculated replace fields operation (In Records menu) to insert a file reference into each container field:


                  Set Field [YourTable::YourContainerField; YourTable::ReferenceField]


                  (For a calculated replace, you'd just enter the expression to the right of the ; in the above example.)


                  To see the format used for storing such references, define a calculation field set to return text and enter just the name of the container field. Then insert a file, using the "by reference" option and then either click into the calculation field or size it to be multiple lines of text tall.

                  • 6. Re: Importing objects

                    You can use a calculation field with the result type set to Container. That way you don't need to import/insert anything.


                    The calculation should return the path to the file, as it would be when inserted into a container field.

                    If you insert a sample PDF into a container field, you can see the exact format by looking at GetAsText ( ContainerField ). You'll likely see both absolute and relative path there - you can use either one.

                    • 7. Re: Importing objects

                      Nice suggestion there comment,


                      just to note one final thing here:


                      "I want to click on the PDF and have it come up full screen in Adobe."


                      If you double click the file, it should do that provided your computer is configured to use Adobe to open the file if you double clicked such a file directly through the operating system.