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

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

Recommended Posts

Posted

In my database "catalogue.fp7" I have made a script (named "update to DCN") making the export of data to Excel. The file is called "update to DCN.xls". It will overwrite the existing file and is located in the same folder every time.

There must be a new export every day at 07:00 hours at working days, the file must be attached to an email to "[email protected]" with subject line "Update from [company name]" and the mail must be posted immediately.

If FileMaker is not open at that time the program must be started, run the script and close FileMaker when done.

How do I do that?

Posted

Appendix: It would be nice if the name of the Excel file could contain the current date, eg. "2012-06-12 update two DCN.xls" and absolutely perfect if also the subject line of the mail might be called '2012-06-12 Update from [company name] "- of course with the current date.

Posted

If FileMaker is not open at that time the program must be started, run the script and close FileMaker when done.

You can use iCal to run Applescript or open a file on schedule. A simple file that calls the export script in your "real" file should do the job.

Appendix: It would be nice if the name of the Excel file could contain the current date

Set a variable to the name you want, then use it as the path.

Posted

You can use iCal to run Applescript or open a file on schedule.

Yep, I've managed to make that. Works perfectly.

Inside FileMaker I have created at script which runs my Export-script and then "Exit application".

In "File" > "File options" I have set this script to run automaticly when FileMaker opens.

And now for the funny part: It works almost too well. Whether I let iCal do the job, or I manually open my database in FileMaker, it does exactly what I asked it of ... and close FileMaker! How should I go in and change something? :jester:

I am painfully aware that my goofy method is not what you recommend, but I thought even that was brilliant, so I would obviously try it.

A simple file that calls the export script in your "real" file should do the job.

Set a variable to the name you want, then use it as the path.

Hmmm, perhaps I see through it a little later. I need the other to act first.

Posted

Ahaaa, so "A simple file that calls the export script" was a FileMaker file. I see. I thought it maybe was a simple text file with som script kode in it or something. Okaaaay :thumbsup:

Well, your post helped me anyway. It got me to think in the right direction. Thank you.

  • 1 month later...
Posted

I have created a dummy database which runs a script calling my main database, performs the export, close the file and exit the application. iCal calls this new FMP-filename on schedule.

It has been running well for a while, but now I want to make a minor change. But how to? When opening the "self-propelled" database it executes the instructions and close. Can I hold a key to break or ...?

Posted

Try pressing Escape or Command-Period. Alternatively, you could open the file by defining a relationship to it from another file.

Command-Period did the job. Thank you very much :hug:

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