Jump to content

Scriptology Book?

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

Recommended Posts

Scriptology, the book and cd, are excellent sources for writing scripts in FileMaker.

It is quite possible for scripts to cause problems when offered to a multi-user environment. ScriptMaker scripts are serviced by a single-threaded engine in FMPro 4. and 5. Rumor has it that even with the "multi-threaded" claims of FMI re 5.5, the "multi--threading" does not support database activities (read scripts), but only static stuff. The web invites multiple visitors. One must assume that it will invite near-simultaneous calls upon scripts.

The problem, which has been discussed here, is that if near-simultaneous calls are made upon scripts via cdml -script tags (and they need not be the same script), one script only will run. The second call (and subsequent calls if a script is running) will not run. Problem one - the data has not been processed. Further, the client making the second call will be advised that their submission was successful. Problem two - the client is misinformed.

Unless you have a workaround, you should avoid all cdml tags which begin "-script". Yes FileMaker, Inc. is aware of this problem. They have been aware of this problem since at least Jan. 31, 2001. (case #2235305, a case which has been "sent to development" and to which FileMaker refuses to respond.)

I have developed a workaround which is quite successful in this regard. I know that making this statement will incur the wrath and ire of several posters to this forum. Please look back to April in the cdml forum for the threads which start "SIMPLIFY ..." for the controversy.

This weekend I hope to be able to test over the web a potential web demo of this workaround which I have just completed. It works tremendously well in a fake lan setup. It has worked successfully every test. even when I made multiple requests from THREE browser windows in a near-simultaneous manner. Yes, I did it successfully. No jamming of the databases and no misinformed clients.

As soon as I am able to test this from a couple of different remote computers, I will be posting further on this. Based on my experience and understanding I anticipate no problems.

Meanwhile, research the cdml and Using the Web Online forums for the month of April.

[ August 24, 2001: Message edited by: Keith M. Davie ]

Link to comment
Share on other sites


I was fortunate enough to get hold of Scriptology when I was starting of serious scripting. Though it does not contain any help for CDML, it has excellent tips/scripts that help you organise your databases, scripts & fields that can save you a LOT of headaches later.

I would definately suggest that you get the basic book atleast. Though I personally feel that the 'Developer Edition' isn't worth the price.

Regards, Partha Dasgupta

Link to comment
Share on other sites


As an aside, am extremely interested in Kieth's solution for using scripts on the web as I have a number of multi-files solutions that I have been forced to work upon with the JDBC driver as I don't get the functionality I need with CDML/Lasso. Would appreciate it if Kieth could give me an URL where I can keep up to date with the progress of the solution.

Especially so as learning/using Java while trying to stick to my schedule has me working 36 hours a day at present.

In fact, if Kieth need any helpers for the web test, I'd be glad to volunteer.

Regards, Partha Dasgupta

Link to comment
Share on other sites

See: http://www.fmforums.com/ubb/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=22&t=000388

My point of view from deep past:

The so-called workaround is testing via script if another script is running. Does somebody seriously think that can work?

2 users cannot run in the same moment script, scripts in the same file or in different files!

To check by script if someone is running a script is (I do not want to be rude or upset you) joke.

The "workaround" relies on SCRIPT (!) to check if somebody is running Script.

In another words, the problem with single threaded FM is just elevated up to another level.

Unlimited is single user single thread engine.

Anatoli Kohout

Link to comment
Share on other sites


Today (Sat) I got things set up for the www. I tested it on my own machine via a connection to myself through a server. It worked fine this way. All previous testing was on a fake lan and was similarly successful.

Having talked with a couple of people, I will probably be able to complete this testing from a couple of remote machines (as previously mentioned) sometime Monday (Arizona time). When I have finished this I will post more.

Remember - this is a workaround to the problem of two or more near simultaneous-calls on the same script or different scripts.

The problem, as I see it, is twofold.

Assume two near-simultaneous calls on a cdml -script.

1. On two near-simultaneous requests, the engine handling ScriptMaker scripts is single threaded. Therefore, one script request will run and one will not run, entirely or partially. The database files will be adversely affected.

2. On two near-simultaneous requests, the engine handling ScriptMaker scripts is single threded. While one script will run and one will not, both clients (assuming only two have made a multiple request on a script - any script) will be informed via the success page that their transaction (click action on a cdml -script tag) was successful.

The solution I have developed responds successfully to MULTIPLE near-simultaneous calls!

My solution does not allow two scripts to be run simultaneously by a single-threaded engine. My solution works around this problem in a two-fold manner.

1. My solution makes sure that there are no problems in the databases involved vis a vis scripts/subscripts and single-threaded engines.

2. My solution makes sure that each client is appropriately informed of what has happened with their request (thier click on the button) and what, if anything, that they need to do further.

[ August 25, 2001: Message edited by: Keith M. Davie ]

Link to comment
Share on other sites

Sunday I tested this application from a Mac uphill from my machine. This is being done over copper and 56k modems.

I began by quickly checking things using one Netscape Navigator window. Everything worked as it was supposed to with just one person online. Then I opened a second NN window. Following the instructions which come with this demo, eventually I was able to get near-simultaneous calls. Though I did have to repeat the process a couple of times. I succeeded with this calling the same script and calling the two different scripts.

Finally I also opened an I.E. browser while leaving the NN browsers open. I set the two NN browsers to run the same script and the IE browser to run the other script. Clicking quickly I had one script run successfully, the next called script did not run successfully and the third called script ran successfully. It is much more difficult to get the script to not run in I.E.

Subsequent to each script which did not run, the process was continued with the proper client actions, and the scripts then ran successfully with the client being so informed.

With every test run today, the workaround worked flawlessly. And that was over the web using one Mac to host and another to test.

Tomorrow I intend to try this again inputting from a PC uptown.

Link to comment
Share on other sites

  • 5 weeks later...

Hal, perhaps your scripts have worked flawlessly because you have not had a busy site. Have you seen what occurs when a near-simultaneous call is made on one of your scripts via the web? Have you tested your sites using multiple requests from several browsers, both IE and NN? If you are successful in making a near-simultaneous call upon a script, you may find that things do not work as "flawlessly" as you would like. Perhaps you would like to give us a URL to challenge your scripts.

Link to comment
Share on other sites

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