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

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

Recommended Posts

  • Newbies
Posted

I'm new to the software, and haven't found any posts so far that could help, so hopefully one of those more advanced can give some help...

I need to create a script that will email one of my callers when the next contact date arrives so they can be reminded to follow up with customers.

Any suggestions?

Posted

Welcome MCW1882!

It's tough to answer your question because it's pretty vague. I've noticed from monitoring this board that there a lots of bright folks willing to help but you need to provide enough detail about your situation to make an answering the question possible with minimal effort.

Specifically, in your case it's hard to tell just how automated you want this to be. Will this be fully automated or will some human interaction be okay?

It would also help if you let us know what emailing program you will be using? SMTPit or a similar plugin? Or maybe just Outlook?

I'll take a swing at answering your question if you give me a little more to go on.

  • Newbies
Posted

Well, it would be nice if it was totally automated.

Essentially what happens is the client file is updated in a field called next contact date. What I need is some way to generate an email that occurs on that date. An Email reminder if you will.

Outlook is fine, unless there is something better out there.

I'm sure it would be an easy script, but I'm just starting with FM7 so am a little bit lost...

Posted

There is a Send Mail script step which you can use for your Found Set--which could be found by choosing the records whose next contact date matches Get (CurrentDate).

Posted

In general terms here's how I would fully automate the reminder script:

Create a script in your main file called "Send Reminders" or something to that effect.

Have the script perform a find by comparing the value of the reminder field to the current date. The function is Get(CurrentDate) and and use whatever comparitor is appropriate (=) or (<=) perhaps. This will produce a found set of only the records that need reminders.

Goto the first record in the found set.

Enter the LOOP script step.

Use the SEND MAIL script step. Set the TO field equal to the field that holds the email address. Enter an appropriate subject and body message by either hard-coding it or you can produce a concatenation of fields.

Have the script GOTO NEXT RECORD and be sure to check EXIT AFTER LAST.

* If you initiate the script manually at this point your reminders should have been sent.

Now to the automatation portion: To kick-off the script that you wrote above use FileMaker's built-in ability to automatically launch a script when the file loads.

Create a new file. In that file create a script (called RUN NOW for instance) that calls the script previously written. At the end of this script enter an EXIT APPLICATION step. Now in the FILE OPTIONS dialog set the RUN NOW script to run on opening.

Now in the Windows Task Scheduler establish a new task that opens the file containing the RUN NOW script. Set the task to run on whatever schedule you choose.

So here's how it works; The Windows Task Scheduler opens a .fp7 file that contains one and only one script. That script is automatically run upon opening. It launches the script in the main file and then immediately ends and closes FileMaker. The script in the main file loops through the found set and makes the actual notifications.

Now for the bad news; if you are running a newer copy of Outlook this probably won't work because Outlook won't let another program send an email without prompting the user to authorize this behavior. This means that a human must sit there and click OK to every message needing to be sent. This method works on older versions of Outlook but with newer versions you are out-of-luck.

If you are planning on doing much in the way of automated emailing from FileMaker I would suggest that you take a look at any of the SMTP plug-ins. I've been using SMTPit from CNS and it works like a champ. With this plug-in the Outlook problem goes away and you will probably find many other uses for it in the way of automation.

There are also scheduling plug-ins but I don't have any experience with them. I'm sure that any solution that employs scheduling plug-ins would be much more elegant than the one I have described.

That's how I would do it with native FileMaker and XP. I slimmed down the steps involved so as to not "muddy-up" the explanation with peripherial stuff. You will probably want to insert error checking and use other "bullet proofing" methods in your final deployment.

Good Luck!

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