Jump to content

Set of Reminders following an order

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

Recommended Posts

I have a database and would need some tips on how to do something.

I have a Customers table, Invoice table and would certainly need a Reminder table for what i want to do.

When a customer makes an order, an invoice is created and sent to customer via email.

I'd like to be able to have a set of reminders automatically created when the invoice is done to remind me

1/ to process payment 7 days later

2/ to send a customer satisafction survey 5 weeks later.

3/ to let me know when customer membership is about to expire (50 weeks later).

I guess i would need a script but what to put in it ?

What if I want the email to be sent automatically?

Thanks for your help

Link to comment
Share on other sites

It sounds like you'll need to use a plug-in of some sort; AFAIK FM doesn't have triggers or event-based features, which are the only way I know to get things to happen automatically.

One alternative would be to create a script that runs on startup and gives you the reminders; this of course, depends on FM being started up each day. This script would perform a series of Finds based on calculated data and display a report for you of each result set. Perhaps like:

Go To Layout["SomeLayout"]

Enter Find Mode[]

Insert Calculated Result [select; "MyTable::MySearchField"; "<" Get(CurrentDate) - 7 ]

Perform Find

Enter Preview Mode[Pause]

/* Repeat for other timeframes */

If you want the email sent, instead of going to Preview Mode, you can insert a Loop that cycles through the found records and sends out a email to each entry found:


Send Mail [No dialog; To: EmailField; Subject: "Whatever You Want, including a database field"; Message: "Your Message, such as 'Pay up deadbeat'"]

Go to Record/Request/Page [Next; Exit After Last]

End Loop

On all these, you should definitely check the FM Help, as I am notorious for missing something really simple.



Link to comment
Share on other sites

I'm sorry; I don't follow?

There's only one type of script that you can create (from the Scriptmaker menu option). But perhaps you wonder how to set up a startup script. To do this, first create your script (e.g., MyStartup), and then go to File->File Options and set the Perform Script option to your script (e.g., MyStartup).

WRT what goes in the script, try putting in the steps I gave before (substituting your real fields for my fake ones) and examine the results. The first set of script steps should search your database for all entries that have a date older than 7 days ago (you might want to set the formula to use an equals sign instead of the less than symbol I originally used), and, once these have been found, goes to Preview mode so you can see how it'll look printed up.



Link to comment
Share on other sites

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