Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

There I was having a random read through the FM help manual and what do you know, i stumble on a wonderful section that lets me execute scripts in filemaker files without showing the application.

Okay, well thats fun, really it is, however, my question is the following.

I need a specific script executed once a day. However, it requires uploading somewhere, so the internet connection has to be valid. What i need to happen is, if the internet connection isn't available, i need to execute the script again in 5 minutes (i suppose i could build this into the actual FM script).

Okay, then slight change in question, if i wanted to put this on the server, how processor / ram intensive would it be re: actually opening FM (not visible) running the script and closing it?

Cheers,

~Genx

Opening FM is always done locally, not on the server. The ActiveX control basically opens the full FM app but does not draw the interface until you set the visible property to "true". If FM is already running it will hook into the running instance. It's just as RAM/processor intensive as running the app visibly.

One other thing: in FM7/8 the ActiveX implementation cannot open a hosted file directly. We could do that in FM5/6 but it doesn't work anymore. So you'd have to open a local file that opens the hosted file.

Since we're talking about VBscript or VB or other programming language to do this in, you can check for internet connectivity in that language. A lot more robust than trying to do this in FM.

Why not bypass this ActiveX thing completely and write something that talks to the XML publishing side: you can extract the data you want and upload it to the internet. You can even run a script if you need it.

You can use PHP with fx.php, or VB.NET/C# with fmDotNet to make this easy.

  • Author

Well, i realized that FM only ever opens on the client rather than on the server, i just need this script to always execute at a certain time and the only computer that is always on is the server...

As for the XML idea, i'm a bit confused. To be honest all i want to do is extract specific data at that point, however don't i need FMSA to do it? Or am i just lost? Any resources you could point me to Wim... i'd really appreciate it.

Cheers,

~Genx

Yes, to ask for data directly from the server you need FMSA. Small price to pay for the power it gives you.

To work with XML publishing you basically construct a URL with your find request (and optionally the request to perform a script).

On the FMSA CD there is a database called "Query String Reference.fp7" that explains how to make the URL.

What you get back from FMSA is basically an XML document. See http://www.connectingdata.com/fmdotnet.htm for an example.

Now, in your choice of programming or scripting languages you can construct & execute the URL and receive that XML in memory. From there you can do anything with it that you like. That's what fx.php and fmDotNet do: they take the pain away of having to know how to construct the URL and they transform the received XML into something useful for the programmer. Arrays in the case of fx.PHP, .NET DataSet in the case of fmDotNet.

Here's a PDF of an example I've written with fmDotNet: http://www.connectingdata.com/report_desktop.pdf

The short & skinny of this is: pick your favorite programming or scripting language and write something that will take the FM data from FMSA and upload it to the web or anything else. It's not that hard to do and it's very rewarding.

Stying within FM to do this will require a robot client machine that is always on. It'll save you the cost of FMSA minus the cost the robot machine. And it will never be as stable as talking to FMSA directly.

  • Author

Thanks Wim, I'll look into it, though i don't think the bosses are likely to go on a spending spree any time soon. We've got a couple of computers lying around so... might just hook one up and use it as your so called "robot machine". I will however look into your techniques nonetheless - even if for future reference.

Thanks loads Wim.

FWIW I have had a "robot" machine running for 5 years - doing exactly as you describe but using Mac OS X and cron jobs.

  • Author

What exatly is a "cron job"?

a Cron job is the equivalent of in Windows is called a "Scheduled task".

Cron is the app on *nix that takes care of the scheduling, just like at.exe in Windows.

  • Author

Ah, sched task gotcha... should've gathered. Oh well, good to know these things.

Thanks Wim,

~Genx

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.