1 Reply Latest reply on Jan 6, 2011 11:59 AM by philmodjunk

    How do I write a script to insert a picture

    DB2

      Title

      How do I write a script to insert a picture

      Post

      I'm having difficulty finding out how to write a script to insert a reference photo into my template.

      My photo's are in C:\pictures

      They are .jpgs based on my Inventory# [field] 

      Example :  Inv#  fg458   =   picture   C:\pictures\fg458.jpg

      Surely this must be easy?

      Thanks for any help.

        • 1. Re: How do I write a script to insert a picture
          philmodjunk

          Use Import Records | Folder to import these records into a related table. There's an import option with this method that will enable you to store the file name of the imported picture in a field during the import.

          A simple calculation field can take that file name and strip off the file extension so that you can link the picture record in this table to your original table by the file name:

          Left ( PictureTable::FileNameField ; Length ( PictureTable::FileNameField ) - 4 )