Jump to content

whats wrong with my Insert File


This topic is 2600 days old. Please don't post here. Open a new topic instead.

Recommended Posts

attached a image my code doing a Insert File


Thought this work once???

.. coming back doing some final testing..

its filing with a error 102 saying field is missing...


 Anyone see anything obvious??


The layout is using Config file

The field is global container

The file i am inserting to the container field is a zip file

My full path looks good

This zip file is in a folder one up from my applications root folder called /KisstarDL

The _NEW_KisExe.zip is in  /KisstarDL    folder




Link to comment
Share on other sites

not quite sure why.. its working again..

My layout didn't have or need the container field showing...

so I put it on the layout to see it.. just for my info to watch it load and clear


now its not getting error 102//


Any explanations?

Link to comment
Share on other sites

My layout didn't have or need the container field showing...



Hi Rod,


Are you sure about that?  FM Help says down in its notes:


If there is no active container field on the layout where the script is being performed, Insert File returns an error code that can be captured with the Get(LastError) function.


Anyway, it's working for you now.  But it would sure be good to find out why it wasn't working.  It is a great learning opportunity!    :laugh2: 

Link to comment
Share on other sites

FileMaker Help doesn't specifically say so, but FileMaker 12 Developer Reference (Bowers, Heady, Lane, Love) says


This script step inserts a file into a selected container field on the current layout.



You can put it offscreen or make it tiny, but it apparently must be there.

  • Like 1
Link to comment
Share on other sites

I guess I wasn't very clear, Doug, thanks for speaking up.  But if you get an error when you attempt to insert a field into a container that isn't on the layout then that also says it doesn't work.  Insert File  ... and Notes explains it.


So if this indeed is Rod's situation, I think we've covered it.  If not, we'll need to look elsewhere such as a not-considered script trigger etc.    But since it began working when he placed the container on the layout then ... that is probably it.  :laugh2:

Link to comment
Share on other sites

This topic is 2600 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By vinnygi
      I'm trying to use a script to Insert File from a specific AFP share into a container field.  Every time I try, I get a 100 error (File is missing) from Filemaker.  If i change the path to a local file, it works fine.

      I've tried hard-coding the path; using a variable; using a global field as a reference. 
      I've also tried all the permutations of the path according to filemaker's requirements...
      filemac:/<path to file>, file:/<path to file>, using /Volumes, /ip address of the share, etc.  For example: "filemac:/Volumes/Folder one/Folder two/filename.pdf", etc.
      No matter what I try, I get the 100 error.
    • By Daniel C
      Hi Everyone,
      I have an animated GIF (spinner icon) in a web viewer that I display while running a script to show the system is busy. One of the script steps inserts a file as a reference. This step takes about 5 to 10 seconds to complete. I have noticed that if the file path uses an address with a mapped drive it is much quicker than a UNC address, unfortunately I need to use a UNC file path. When the script gets to the insert file as reference it stops the animated gif and causes the web viewer to go blank until the insert file step completes. Any ideas on a fix to keep the GIF animated while the insert file as reference completes or any other solutions?
      Thanks for your help
    • By ddinisco
      I can not for the life of me get this script step to work when defining a specific volume. I am simply trying to insert a document with this path -
      filemac: /Volumes/networkFootage/Digital_Deliverables_Packages/aetv_68610_rebrand/_Delivery_Packages/68610_Delivery_13-0723/_VC_PackageSummary_13-0723.numbers
      It only appears as though this script step seems to work when using the Get(DesktopPath) or Get(DocumentsPath) ahead of the file name. Please tell me this is not the case.
      There error I am receiving is that it cannot find the file, thus I get the dialog box to locate it. I can manually insert (without using the script) without issue. Too many frustrating hours on this, and I bet it is something simple.
      Thanks in advance,
    • By Melborne
      I have a file with 'Check OUT' and 'Check In' functionality.
      I 'Check Out' a file from a container field to temp storage using 'Export Field Content' and 'Check In' from the same location(temp storage) using 'Insert File' after making changes.
      If I Check Out an Excel or Word file, and try to 'Check In' while the 'Checked Out' file is still open, I get the error 'This file is locked or in use.' (please refer screenshot) but the script does not throw any FileMaker error.(It works fine with Text file)
      How can I capture the error if file is open and FileMaker can not perform 'Insert File'? ( So that I can avoid setting flag fields)
      I am using Windows 7 and FM Pro Advance 12.
      I have attached a sample file.
      Thank you.
      sample check out.zip

    • By MariaAux

      I'm creating a IWP database of children's games.The games have worksheets which are displayed as images in a container field. In IWP, these images can't be downloaded to the user unless I Insert the image as a file (not stored a reference) in another field. I've got 1000's of worksheets so is there a script I can make that will essentially;

      Export field contents ('IMAGE' field; of Worksheet image.gif, to the temp folder)
      Insert file (into 'FILE HOLDER' field;of .gif just exported, don't store as reference)

      I have tried for two days to get this working, but I just can't do it.

      Or is there another way for the IWP client to download the image apart from what I am trying to do or "right-click, save image as"

      Please help. I am tearing my hair out

      Thanks so much in advance
  • Who Viewed the Topic

    2 members have viewed this topic:
    dpwilton  Richard Carlton 
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.