Solved

filemaker server load script

Posted on 2012-03-14
10
447 Views
Last Modified: 2012-03-22
On my computer, I have filemaker client. I can open the database and manually execute scriptmaker script.

Now, I need to execute the script on the filemaker server. I have the admin console open. How do I open the database and execute the script? I tried to click on the database, and I selected the database, selected open, clicked on "perform action", nothing happens.

Also I created a schedule, I run the schedule, I know the script does not run successfully since the data I needed didn't come in. Is there any log file or something to let me know which step is wrong or tell me the script execute status etc? Thanks.
0
Comment
Question by:xiaoyunwu
  • 5
  • 5
10 Comments
 
LVL 24

Expert Comment

by:Will Loving
Comment Utility
I only have a moment right now, but take a look at this knowledgebase article and see if it helps along with the additional links at the bottom.

http://help.filemaker.com/app/answers/detail/a_id/6443/~/running-a-server-side-script-on-filemaker-server
0
 

Author Comment

by:xiaoyunwu
Comment Utility
I was able to figure out on the server machine, there're filemaker server and filemaker pro. Filemaker server is where I schedule script etc. Filemaker pro is where to open all the database and make the scriptmaker script. And now I see in the schedule after I run the script, there's a status tell me "scriptmaker script aborted", if I run the script via filemaker pro under that database and execute directly, it works. But if I schedule with server, it does not work, status is aborted. I make the script as simple as open a database, still get the same error, not sure what's the problem.
0
 
LVL 24

Expert Comment

by:Will Loving
Comment Utility
Well, part of the problem is with your test script using "Open File". That script step is not supported for Server-side scripting. To see which script steps are supported, open Scriptmaker and then your test script. Go to the lower left corner of the Edit Script window and change the "Select Compatibility" option to Server. Only the script steps that are NOT grayed out are available for server side scripts.

I would suggest using the Set Field script set. Select a field that is easy to see the change in or create a new field for test purposes and add it to a layout out. You'll also probably want to use a Go To Record step before Set Field to make sure you're either on the first or last record.

Show script step compatibility
0
 

Author Comment

by:xiaoyunwu
Comment Utility
Now my problem becomes: how to schedule a script in filemaker pro instead of filemaker server. Or is this possible? Since the script is there already and can run perfectly in filemaker pro manually. I do not know how to and do not have time to rewrite the script. I only want the script to run daily by itself.
0
 

Author Comment

by:xiaoyunwu
Comment Utility
my version: FileMaker Pro 9
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 24

Expert Comment

by:Will Loving
Comment Utility
Using Server-side scripting is the only simple way I'm aware of to have something run automatically in the background on a daily basis. There are other ways to do it but all require more involved scripting and setup. If the server-side script was working previously then it should be possible to get it working again.

You may get a clearer picture of what the error is by checking the FM Server Events log. See this FileMaker Knowledgebase article for more info on where to find it:

http://help.filemaker.com/app/answers/detail/a_id/6551/

In addition, the fact that the script runs fine in FileMaker Pro probably means that there is something Server specific that is not right. I can think of two things that might cause that:

The use of an Import File location that is NOT allowed for FM Server - FM Server has a more restrictive set of allowed locations.
A script step that is not Server compatible.

Of those two options, I consider the first one to be the most likely since it doesn't appear that the script has been edited to include a step that is not server compatible.

If the script worked previously, then what has changed? Is the file to be imported being saved in the EXACT same location with the EXACT same name? Is that location one of the allowed location for FM Server? (it might be allowed for FM Pro but NOT server)  When you run it with FM Pro is the file being imported without a dialog or are you getting a dialog popping up indicating that the saved location for the file is not proving to be valid?
0
 
LVL 24

Expert Comment

by:Will Loving
Comment Utility
> my version: FileMaker Pro 9

Another possible problem. If you are also using FileMaker Server 9, I'm pretty sure that server-side support of Import and Export was not introduced until FM Server 10. I recommend that you:

1.

Check to see what version of FM Server you are running

2.

Open the script with the SAME version number of FM Pro

3.

Check to make sure that all script steps used in the script are compatible with the version of Filemaker Server.
If you moved this database "in-house" did you possibly switch from FileMaker Server 10 to FMS 9, for which Import and Export are not supported?
0
 

Author Comment

by:xiaoyunwu
Comment Utility
server version: FileMaker Server 9
All the server didn't change, since we used to have someone comes in or remote access our server to make things happen. Since I can't see anything in the scheduled list of server. And there're a lot of open, import steps in the script. I'm guess they somehow run the script somewhere else.

I found this one even though I'm not totally understand it yet.
http://forums.filemaker.com/posts/6117c6fb30
0
 
LVL 24

Accepted Solution

by:
Will Loving earned 500 total points
Comment Utility
There are a number of options there though probably the best one is to have the script triggered by the last user closing out of the program. You use the option to run a script on File Close  (under File -> File Options) and it checks to see if Get( UserCount ) = 1  - meaning that person is the last person accessing the db - and then triggers the script.

However, that may not work if your Import file is not local on the machine that is running script. There is also a plug in called "ScriptFire" which may let you do what you are talking about with FM Server 9 but you'll need to figure out the programming. http://www.dacons.net/fmplugins/scriptfire/

I think that simplest and probably least expensive option in terms of both time and money (your time presumably being worth money)  to do at this point is to consult with former developer and find out how they did it and why it may not be working.

I would again say I can't understand how the script could have been run automatically using server-side script scheduling using FileMaker Server 9. It is my understanding that that function simply wasn't supported by FMS 9. If they were using 9 and doing importing, then they must have been triggering the script another way.
0
 

Author Closing Comment

by:xiaoyunwu
Comment Utility
Hi willmcn,
Thank you so much for all the help.
I eventually used scriptfire plugin as you mentioned in the link: http://www.dacons.net/fmplugins/scriptfire/. It works great.
I did see "Run script daily.fp7" on the server that might have been what former developer used.
Thanks again!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now