Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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

Posted

No, it's not simple. frown.gif

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.

Posted

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

Posted

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

Posted

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

cool.gif

Posted

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

cool.gif

Posted

"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?

Posted

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.

Posted

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.

Posted

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. smile.gif

Cheers

Posted

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.

Posted

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

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 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.