1 Reply Latest reply on May 21, 2012 1:59 PM by philmodjunk

    File Insert with Variable for File Name



      File Insert with Variable for File Name


      I thought I had this figured out.  I'm looping through a found set of file names, inserting the files into a container field with external open storage.

      The first time through the loop, the file is inserted correctly.  The second time through the loop, I'm presented with a dialog where I'm supposed to select the file to be inserted.

      The variables are correct for the second loop.  The file insert setting are identical.  In fact the setting for the first loop were copied for all other loops with only the target field being changed.

      When I select a file through the dialog, it is inserted correctly.  The problem is the dialog coming up even though the Dialog Options check box on the Insert File script step is left unchecked.

      The second screenshot shows that the loop is working correctly, these values are after I have had to select the import file from the dialog.  However, note that the $InsertFile variable and $c2 counter has changed to the second found set.  In both cases the Specify File setting is File:&$InsertFile.



        • 1. Re: File Insert with Variable for File Name

          We need to see your script. The fact that Paths::filePaths is showing <Unrelated Table> may or may not be a clue here.

          To post a script to the forum:

          1. You can upload a screen shot of your script by using the Upload an Image controls located just below Post A Answer.
          2. You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here.
          3. If You have FileMaker advanced, you can generate a database design report and copy the script as text from there.
          4. If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format. (Use the HTML option on the database tab panel and paste the text into the forum's HTML editor.)