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.

External script execution in Filemaker app

Featured Replies

  • Author

I've been tasked with updating an acquired FM database application that is currently running in Filemaker Server 5.5 on a Windows 2K server.

In the application when someone clicks on a button, I want to execute a Perl script and then have the results of the Perl script written to a field.

When the application is running, will the reference to the external script know to look for this external script on the server? Or will any external scripts executed from a Filemaker Server application need to be installed on the client workstation?

I know I could test this myself. However, I don't have access to the production server. There is no development server (to my knowledge). And my development environment is a Macintosh. I'd like to have this info so I can go to my management and request access/additional resources in order to do this job I've been tasked with.

I'd really appreciate any insight that can be provided. If someone can refer me to a good technical book or documentation that would provide me with the info I need would be welcome.

Thanks so much,

Jack

I've been tasked with updating an acquired FM database application that is currently running in Filemaker Server 5.5 on a Windows 2K server.

In the application when someone clicks on a button, I want to execute a Perl script and then have the results of the Perl script written to a field.

When the application is running, will the reference to the external script know to look for this external script on the server? Or will any external scripts executed from a Filemaker Server application need to be installed on the client workstation?

I know I could test this myself. However, I don't have access to the production server. There is no development server (to my knowledge). And my development environment is a Macintosh. I'd like to have this info so I can go to my management and request access/additional resources in order to do this job I've been tasked with.

I'd really appreciate any insight that can be provided. If someone can refer me to a good technical book or documentation that would provide me with the info I need would be welcome.

Thanks so much,

Jack

  • Author

I've been tasked with updating an acquired FM database application that is currently running in Filemaker Server 5.5 on a Windows 2K server.

In the application when someone clicks on a button, I want to execute a Perl script and then have the results of the Perl script written to a field.

When the application is running, will the reference to the external script know to look for this external script on the server? Or will any external scripts executed from a Filemaker Server application need to be installed on the client workstation?

I know I could test this myself. However, I don't have access to the production server. There is no development server (to my knowledge). And my development environment is a Macintosh. I'd like to have this info so I can go to my management and request access/additional resources in order to do this job I've been tasked with.

I'd really appreciate any insight that can be provided. If someone can refer me to a good technical book or documentation that would provide me with the info I need would be welcome.

Thanks so much,

Jack

I saw the original post in the other forum.

If you are bound to Perl, you should be able to put the Perl file on a Server, then mount/map a drive to the server. Quite possibly, your admin already has some mapped.

You would then be tasked to make sure that each workstation can (1) get to the drive & (2) run Perl. I don't know Perl, but I would guess that you could use the same script between MS & Mac. Just guessing on that one.

I have not done this from FileMaker but have done it from other apps.

Actually want to thank you for posting. I needed an alternative to writing Plug-Ins. I didn't know how the external scripting worked before.

Depending on your web set up & attachment to Perl, if you can run anything with http:, you have access to JavaScript, JSP/ASP & what not. It would require functioning web server though.

Good Luck.

I saw the original post in the other forum.

If you are bound to Perl, you should be able to put the Perl file on a Server, then mount/map a drive to the server. Quite possibly, your admin already has some mapped.

You would then be tasked to make sure that each workstation can (1) get to the drive & (2) run Perl. I don't know Perl, but I would guess that you could use the same script between MS & Mac. Just guessing on that one.

I have not done this from FileMaker but have done it from other apps.

Actually want to thank you for posting. I needed an alternative to writing Plug-Ins. I didn't know how the external scripting worked before.

Depending on your web set up & attachment to Perl, if you can run anything with http:, you have access to JavaScript, JSP/ASP & what not. It would require functioning web server though.

Good Luck.

I saw the original post in the other forum.

If you are bound to Perl, you should be able to put the Perl file on a Server, then mount/map a drive to the server. Quite possibly, your admin already has some mapped.

You would then be tasked to make sure that each workstation can (1) get to the drive & (2) run Perl. I don't know Perl, but I would guess that you could use the same script between MS & Mac. Just guessing on that one.

I have not done this from FileMaker but have done it from other apps.

Actually want to thank you for posting. I needed an alternative to writing Plug-Ins. I didn't know how the external scripting worked before.

Depending on your web set up & attachment to Perl, if you can run anything with http:, you have access to JavaScript, JSP/ASP & what not. It would require functioning web server though.

Good Luck.

I don't think there's a way to execute the script on the filemaker server machine and have it work. The way I'm doing it, I have Perl installed on each client machine, and I just copy the script itself to a local file on each client machine. You could store the script as text in a field, and export it to a file on the client machine, to make sure the most current version is there, but Perl will have to be installed....

The other alternative would be something like NYPoke suggested... have your perl script running on a web server as a web service, then use filemaker's XML import capabilities to query the web server's perl script (with the parameters in the URL) and bring the data into a field. This might require you to rework the input/output of the Perl script to work with XML. I haven't done this myself, but there's a good description in the book "Using Filemaker 7" (should apply to any version of FMP that can speak xml...5.5 and up)

I don't think there's a way to execute the script on the filemaker server machine and have it work. The way I'm doing it, I have Perl installed on each client machine, and I just copy the script itself to a local file on each client machine. You could store the script as text in a field, and export it to a file on the client machine, to make sure the most current version is there, but Perl will have to be installed....

The other alternative would be something like NYPoke suggested... have your perl script running on a web server as a web service, then use filemaker's XML import capabilities to query the web server's perl script (with the parameters in the URL) and bring the data into a field. This might require you to rework the input/output of the Perl script to work with XML. I haven't done this myself, but there's a good description in the book "Using Filemaker 7" (should apply to any version of FMP that can speak xml...5.5 and up)

I don't think there's a way to execute the script on the filemaker server machine and have it work. The way I'm doing it, I have Perl installed on each client machine, and I just copy the script itself to a local file on each client machine. You could store the script as text in a field, and export it to a file on the client machine, to make sure the most current version is there, but Perl will have to be installed....

The other alternative would be something like NYPoke suggested... have your perl script running on a web server as a web service, then use filemaker's XML import capabilities to query the web server's perl script (with the parameters in the URL) and bring the data into a field. This might require you to rework the input/output of the Perl script to work with XML. I haven't done this myself, but there's a good description in the book "Using Filemaker 7" (should apply to any version of FMP that can speak xml...5.5 and up)

I looked a little closer this afternoon. I don't think we can get 2 way data transfer with the "Open URL", other than the external app doing a Cut/Copy & FileMaker doing a Paste.

I looked at the Troi Text Plug-Ins & found something more interesting. (Doesn't Troi come pretty standard with FM?). They have a set of Plug-Ins called "TURL-". As expected they work with URLs. It certainly appears that we can get 2 Way data transfer AND you could run the script off of a Server.

They reference the Web Companion, which I think is a FM Plug-In. Somebody here would know better than me though.

This URL is obnoxiously long (& looks a little out of date). But, this appears like it will fit your needs...

http://64.233.187.104/search?q=cache:F9v...ug-in&hl=en

I looked a little closer this afternoon. I don't think we can get 2 way data transfer with the "Open URL", other than the external app doing a Cut/Copy & FileMaker doing a Paste.

I looked at the Troi Text Plug-Ins & found something more interesting. (Doesn't Troi come pretty standard with FM?). They have a set of Plug-Ins called "TURL-". As expected they work with URLs. It certainly appears that we can get 2 Way data transfer AND you could run the script off of a Server.

They reference the Web Companion, which I think is a FM Plug-In. Somebody here would know better than me though.

This URL is obnoxiously long (& looks a little out of date). But, this appears like it will fit your needs...

http://64.233.187.104/search?q=cache:F9v...ug-in&hl=en

I looked a little closer this afternoon. I don't think we can get 2 way data transfer with the "Open URL", other than the external app doing a Cut/Copy & FileMaker doing a Paste.

I looked at the Troi Text Plug-Ins & found something more interesting. (Doesn't Troi come pretty standard with FM?). They have a set of Plug-Ins called "TURL-". As expected they work with URLs. It certainly appears that we can get 2 Way data transfer AND you could run the script off of a Server.

They reference the Web Companion, which I think is a FM Plug-In. Somebody here would know better than me though.

This URL is obnoxiously long (& looks a little out of date). But, this appears like it will fit your needs...

http://64.233.187.104/search?q=cache:F9v...ug-in&hl=en

  • Author

Thanks for all the feedback. This will hopefully be helpful when I return to this task next week. I really appreciate the ideas and I will investigate them.

I was originally thinking that HTTP was an option. However it turns out that the HTTP route would require user authentication where as running a Perl command from a secure telnet session would not. So I'm opting to not use HTTP if I can as I don't think management wants to provide username/password for each user to this process.

  • Author

Thanks for all the feedback. This will hopefully be helpful when I return to this task next week. I really appreciate the ideas and I will investigate them.

I was originally thinking that HTTP was an option. However it turns out that the HTTP route would require user authentication where as running a Perl command from a secure telnet session would not. So I'm opting to not use HTTP if I can as I don't think management wants to provide username/password for each user to this process.

  • Author

Thanks for all the feedback. This will hopefully be helpful when I return to this task next week. I really appreciate the ideas and I will investigate them.

I was originally thinking that HTTP was an option. However it turns out that the HTTP route would require user authentication where as running a Perl command from a secure telnet session would not. So I'm opting to not use HTTP if I can as I don't think management wants to provide username/password for each user to this process.

  • 2 weeks later...
  • Author

To follow up on this, I'm going with the idea of using the Troi URL plug-in. It is working great so far with my testing. I've got buy in/purchasing support from management.

The only issue is the concern of username/password that needs to be hard coded in the Filemaker app. But they'll need to get over it since they don't want anyone to have to enter a username/password and want everything transparent.

Thanks again for the plug-in suggestion.

I regularly call javascript & vbscript from FM and write the results to a FileMaker field.

To do this, I use a FM plug-in called MVAnything (www.mallverkstan.com/mvanything) which calls Windows scripting host, executes your script , and returns the result. You can even send parameters to the script.

Syntax looks like this:

set field[my_result] =

external["MVAnything-DoWshScript", "myscript.js|param1|param2"]

Your scripts are stored in the FM System directory. If you are using FM7, you need to create the System directory.

Been using it for a over a year, and now couldn't live without it. They have a trial version online with examples.

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.