Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi All,

An interesting new dilemma has arisen out of my utilization of the very common "Insert File" script step.

The problem is that the script doesn't seem to work on files that have a lengthy file name. On occasion, it's even caused the database to crash. I'm inserting only the filepath, not the actual file: I made sure of that.

Is there a character limit on the names of the files that can be attached to a database records using the "Insert File" script step? And if so, can somebody suggest a workaround to prevent crashing in the event that a user attempts to attach a file with a lengthy filename to a database record?

One further less important question: does this script work faster when using Filemaker Server as opposed to sharing a database without Server? It often takes 30 seconds to insert a file into a record, regardless of the fact that I'm only inserting the filepath, and not the file itself.

Thanks!

J

Posted

There probably is a limit the file file path length - but I can't find a reference to it. In FM6 the limit for a filename length was 31 chars.

Is it possible that there are some invalid characters in the file path? Watch out for trailing spaces.

As for the slow response - do you have a container displaying the file on the same layout? What other external references do you have in your file?

  • 3 years later...
Posted

I have finally, FINALLY stumbled across the solution to my problem I was also having with the agonizingly-slow InsertFile script step. In my case, working on a hosted database, the secret was in the External Data Source management !!

 

I was using two databases, one local and one remotely hosted on another machine, with the local database using the remote database as an External Data Source.

 

Original File Path List that allowed access to external data just fine yet caused MAJOR slowness using Insert File Script Step:

   fmnet:/www.mydomain.com/RelatedDatabaseName

 

Modified File Path List that solved the problem:

   file:RelatedDatabaseName
   fmnet:/192.168.1.108/RelatedDatabaseName
   fmnet:/www.mydomain.com/RelatedDatabaseName
 
I needed all three because it will be used here locally (where the FMServer is located) as well as externally by other clients using the domain name.
 
Now the script takes less than 1 second, as it well should, where before it was taking 20-30 seconds each time it ran, causing the spinning beach ball-of-death and lots of finger tapping while uttering vocabulary not fit for fellow workmates...

This topic is 4005 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
×
×
  • Create New...

Important Information

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