taishi01 Posted March 29, 2005 Posted March 29, 2005 Is there a simple way to launch a script via a calculation? Say for example I'm tracking how many times a user logs in and the count equals 5, I would want it to then launch a customized script that would change information in a particular field. I've got my script working perfectly, I just don't know how to make it launch from a calculation. Thanks for the help
Vaughan Posted March 29, 2005 Posted March 29, 2005 No, it's not simple. But that's not the issue. The issue is, how are you going to track how many times the user logs in? It'll have to be done through some sort of process... and a "process" is done by a script. Since the process needs to look at the number of times a person logs in, the script needs to run at startup. And FMP lets you define scripts to run at startup and shutdown, in the document preferences. The script needs a conditional IF...ELSE...END IF that considers the user login count calculation. It could be: If [ UserLoginCount = 5 ] <change information in field> Else <other stuff> End If Note that this is what you have specified: the login count equals 5. I'd consider coding it to say count > 4 to catch the unlikely situation that the login count jumps unexpectedly to 6.
taishi01 Posted March 29, 2005 Author Posted March 29, 2005 Thanks Vaughan, but I already have the calculation solved for checking how many times the user logs in and how to change information in a particular field when the user has done so. What I'm trying to mainly figure out is how to make my particular script launch via a calculation. Not sure how to get it to trigger and run. I've developed a script that I can pull down and make run perfectly to do exactly what I need to do. I have a field that contains a number, and a tracking field that looks at the number and increments when the first field increases. It tracks the first field perfectly, I just haven't found a way to do a calculation that can open my script. My script when activated manually can insert text into another field as needed, but then again it's manually. I know how to activate scripts over the web within Filemaker, just wondering if it'd just be easier to do a token/script combo. That way the token looks at the number of times the person logs in and increments it for me and then when it reaches 5 it launches the script for me to insert the extra text. Hmmmm! Guess I'll try it and get back to you. Thanks again
Veselko Posted March 29, 2005 Posted March 29, 2005 You can use a EventScript to trigger a script. Try to go on http://www.softs4humans.com/FMPro_Plugins.html it's free plugin. Very useful thing.
taishi01 Posted March 29, 2005 Author Posted March 29, 2005 Veselko, Thank you, but will this run under Filemaker 6.0? Would need a way to make it work in Filemaker 6.0 as that's what I have currentl
Lee Smith Posted March 29, 2005 Posted March 29, 2005 Hi Veselko, Although you can use EventScript for Free, the author does request that you make a [color:"blue"] Donation, using [color:"blue"] PayPal if you like it and us it. Lee
taishi01 Posted March 29, 2005 Author Posted March 29, 2005 Hi Lee Will EventScript work under FileMaker Pro 6? Wouldn't mind making the donation if it will work.
Lee Smith Posted March 29, 2005 Posted March 29, 2005 Sorry, no. There are other plugin that do work with Version 6, which is V5 file format. Depending on what you want to accomplish, you will need to read about the different ones. I would start by searching the Plugin Topic Area of the Forums. HTH Lee
Vaughan Posted March 30, 2005 Posted March 30, 2005 "just wondering if it'd just be easier to do a token/script combo" Tokens are a CDML technology... is this meant to work through the web interface?
taishi01 Posted March 30, 2005 Author Posted March 30, 2005 Vaughn, Yes, will be a web interface. Will have users login and track the amount of times they've logged in and using I guess tokens and CDML activate a script. Looking at using the Troi-Activator plug-in as a means of accomplishing this if I have to.
Vaughan Posted March 30, 2005 Posted March 30, 2005 That changes things very significantly. The web interface is significantly limited compared to the client, and the FMP 6 Instant Web Publishing has fewer features than that in FMP 7. Among other things, you'll have to check whether plugins work through the web interface. Certainly event plugins won't work with FMP 6 IWP.
taishi01 Posted March 30, 2005 Author Posted March 30, 2005 Again thanks to all of you for the useful help in trying to solve the problem I'm having. One way or another I'll get it working, just looking for the least amount of work and cost. Just have to experiment a bit I guess. Cheers
taishi01 Posted April 1, 2005 Author Posted April 1, 2005 Thanks all, been sick with the flu for the past few days. Will use Lee's suggestion and see where it gets me. Have an excellent day all.
SteveB Posted April 2, 2005 Posted April 2, 2005 I don't believe Troi Activator will do what you want. Look at web page He has a free plugin, altho I don't know if it will work on Macs. Its trival to use. When the user leaves a field, a script can run. The script name is inserted under the validation section. Make sure you call the version portion of the plugin before you use the plugin the first time. Its limitation appears to be that it won't work very well on related fields from the parent file. Steve
Recommended Posts
This topic is 7178 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 accountSign in
Already have an account? Sign in here.
Sign In Now