March 29, 200520 yr 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
March 29, 200520 yr 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.
March 29, 200520 yr Author 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
March 29, 200520 yr 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.
March 29, 200520 yr Author 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
March 29, 200520 yr 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
March 29, 200520 yr Author Hi Lee Will EventScript work under FileMaker Pro 6? Wouldn't mind making the donation if it will work.
March 29, 200520 yr 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
March 30, 200520 yr "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?
March 30, 200520 yr Author 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.
March 30, 200520 yr 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.
March 30, 200520 yr Author 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
April 1, 200520 yr Author 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.
April 2, 200520 yr 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
Create an account or sign in to comment