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

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

Recommended Posts

Posted

I'll try to explain the situation.

My solution was made to edit, maintain, add information to digital price lists (I'm in the wholesale business)

It is made of a client side (one fm file on the user pc) and a server side (some files on the server).

The basic idea is this: the server stores a lot of price lists, every edition from each supplier. The user "download" from the server the price list he have to work on, work on it locally and then "upload" the single price list into the server repository.

The download is easy, just an "Import records" from the server file.

However I cant use "Import" for the upload because the client fm file may be anywhere on the user pc, so I would have to give him the responsibility to manually find the fm file on his computer. You know what this may lead to...

So, a script is going trought all local records, copying the field' contents on globals on the server file and calling an external script that copies the globals on a new record.

The problem is that with 50+ fields the upload is performed at no more than 2-3 records/second.

Some price lists may have more than 5000 records and up to 10000, so 30-60 minutes of processing.

Any idea on how to do it faster?

Thank you!

Paolo.

Posted

Yes, Paolo, there is a Santa Claus and you can 'upload' files as you describe.

If you are using a FileMaker Server to host the files, when the user opens the files on the server, everything is relative to the user's machine. You can set up an 'import' script in the main file to import the records from the client file. Just makes sure you use relative path to the client file. Scripts, calculations and relationships are relative to the client - not the server.

There are several 'gotchas' to this method:

If the user renames the client file, the upload will fail - the server will not be able to find the file to open it.

If the import is interupted during the process, the import will not be complete - you need to trap errors to ensure that all records were imported and some method to restart the import process.

I am using this very scenario to upload records from a client file to a server on the internet, which is used as a temporary repository, then are imported into the main file inside our firewall.

Posted

Thank you very much, I should have tried it before...

(...before defining 50 globals and 100 script steps to copy to and from globals! I feel so stupid!)

I'll use a Status(CurrentFileName) to ensure the user didn't rename the file.

Again, thank you.

This topic is 7692 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.