September 30, 200322 yr I have a little script that formats a work order number to 'YYYYMMDD.n' where 'n' is the nth work order submitted for the day. I want the script to be executed when a new record is created in the database. The users enter work orders via a custom web form that creates a new record in the database. How can I do this? Thanks!
September 30, 200322 yr Re: Can you run a script in FM from the web? The answer is Yes. re: How can I do this? The syntax can be found in the CDMLRdb which you were advised to get. re: script that formats a work order number to 'YYYYMMDD.n' where 'n' Whatever the script does cannot be important to the solution because of the issues with the way ScriptMaker handles events and the way CDML does not recognize event failures. You will find this issue widely discussed in the Internet forums. Do a little reading on the subject before you proceed. down this path.
September 30, 200322 yr I believe that calculation field will do the trick and no script is necessary. Something like: Year(DateC) & Right( "0" & Month( DateC ), 2) & Right( "0" & Day( DateC ), 2) & "." & Counter Where DateC is creation date and Counter is just serial number field. HTH
October 2, 200322 yr Bottom line is, avoid using scripts on the web. Do everything with calculations if possible. The hosting company I use will not host a database that runs scripts from the web. It crashes their servers!
October 3, 200322 yr Perhaps the problem is with developers who do not know how to run ScriptMaker events safely on the www. For a hosting service to allow ScriptMaker events to be run, every solution sharing ScriptMaker and WC would have to be coordinated in the solution. Since that could involve a coordination of many diverse entities who might want to share their solution, it is not realistic for a hosting service to allow its clients to run ScriptMaker script events. To run ScriptMaker events successfully on the www one should host one's own db files/format files, which, in the long run is cheaper and more practical than using a hosting service. ScriptMaker events can be run on the www safely and successfully. You can figure out how to do it in just four to eight weeks.
Create an account or sign in to comment