Question

Simple FileMaker Pro Calculation and Script (Date Related)

Asked by: jazzviolin

I would like to create an automated email that is sent to me based on a certain date.

For example:

Client = John Doe
Email = john@domain.com
EventDate  = 09/20/2009
Balance = $100
BalanceDue = 30 Days before EventDate

---

Send automated email to myself on BalanceDue stating that Client at Email needs to pay Balance immediately.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-02-19 at 19:15:19ID24160662
Tags

filemaker

,

calculation

,

script

,

scripting

Topics

FileMaker Pro Database

,

Databases Miscellaneous

,

Scripting Languages

Participating Experts
2
Points
500
Comments
21

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. FileMaker Automation?
    I want to create an application to Automate FileMaker, what I mean is to be able to do the following in FileMaker: 1) create a database. 2) create forms/views for that database. what I mean by Automation is: by using a FileMaker library (or something like that) to be able to...
  2. Inserting records into FileMaker Pro database?
    I'm a database developer/DBA (Oracle and some SQL server) and, being the new guy at our company, last week I was given the task of figuring out how to write to the FileMaker Pro database for the web guys here. They're using ASP, and so I figured out how to write to FileMaker...
  3. Copy from Excel to Filemaker pro 5
    How to copy perticular cell from MicroSoft excel sheet and paste it in perticular text box of already existing database file in Filemaker Pro 5?
  4. Accessing FileMaker data with FileMaker server 7.0
    hi, I can set up ODBC when using FileMaker pro and everything is fine. With FileMaker Server running, I cannot use ODBC anymore; unless I get FileMaker Advanced Server apparently. is there any way (ODBC or other) to access FileMaker data when using FileMaker Server 7.0? ...
  5. FIlemaker and clipboard
    I have some scripts that use the copy / paste command in filemaker and I noticed that after some time it stops working on several pc's even when I click in the field and do a control - c to copy to contents of it and open notepad I cannot paste anything. THis only happens af...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: cogitivePosted on 2009-02-19 at 21:23:55ID: 23689063

The answer may be different depending on the version of FileMaker being used and whether it is on a server.

Can you please provide the FileMaker Pro version you are using and FileMaker Server version if on a server.

 

by: jazzviolinPosted on 2009-02-19 at 21:44:34ID: 23689152

FileMaker Pro 9 - I'm hosting the master file online with a hosting company that hosts FMP databases.  

 

by: cogitivePosted on 2009-02-19 at 23:41:25ID: 23689646

You need to run a script (daily) that finds records the where BalanceDueDate = Today, then email each of the matching clients.

FileMaker 10 has an "onTimer" script trigger which could help to do the job. Also if you had the database on FM Server v10 it can run scheduled scripts.

It is worth checking with your FM hoster to see if they offer any scheduled script capability.

Uusally with FileMaker 9 you will need to use a plugin (or other extra software) like one these options:

Troi Automater
or
myfmbutler DoScript
or
myFMbutler AutoSender

http://www.troi.com
http://myfmbutler.com

 

by: jazzviolinPosted on 2009-02-20 at 00:02:40ID: 23689730

Okay I'm purchasing Filemaker 10 Advanced tomorrow.  Can you outline step-by-step instructions on how to do this with 10 then?  Thank you for your support.

 

by: cogitivePosted on 2009-02-20 at 03:31:15ID: 23690850

I have put together a demo file for you.

One limitation is that you need a FileMaker window to be open for the program to continue to run. It also needs a net connection of course to send the email. So essentially you need a computer somewhere with the database open.
It is OK to have the database hosted with an online service but you still need a 'workhorse' computer to handle the emailing process.
The 'workhorse' can do other things, it just has to keep the 'special' FileMaker window open.

I've tested the solution and it happily emails me (I put in it my gmail settings which I've now taken out) every 60 seconds. You might want to test it on that to start with and later change it to 86400 (60 * 60 * 24).

You can download it from here:
http://cognitive.com.au/solutions.htm

 

by: jazzviolinPosted on 2009-02-20 at 03:36:40ID: 23690873

Awesome.  I will attempt to this tomorrow when I get FMP 10.  Thank you for your help.

 

by: jazzviolinPosted on 2009-02-20 at 07:19:56ID: 23692728

Having trouble getting it to email.  A direction sheet would be wonderful.

 

by: cogitivePosted on 2009-02-20 at 15:02:55ID: 23697172

I will put together details in a few hours. In the meantime try and obtain you SMTP settings (from you email service provider). That is outgoing mail server, name, pass, SSL ON or off.

 

by: jazzviolinPosted on 2009-02-20 at 15:22:11ID: 23697288

Will do.  I examined your script closely and thought I understood it and had it, but for some reason, it never emailed.
Thank you.

 

by: lesouefPosted on 2009-02-20 at 15:47:01ID: 23697392

you can avoid to leave it open all the time if you set your script to be the startup script, and set that same script to close the file upon completion, then put a task in the scheduler to start fm + the file @ a certain time.
if this script is one script among a more complex application, simply do a separate fm file with a script which will open the main file, execute the mail script then closes the main file, then closes itself, thus avoiding the main app to close when used directly. the cheapest timer over all. the other advantage is that if the app is closed for some reason, the scheduler always works even after a reboot ir a server disconnection.

 

by: lesouefPosted on 2009-02-20 at 15:50:03ID: 23697408

last bit, does not need fm10...

 

by: cogitivePosted on 2009-02-20 at 17:27:43ID: 23697802

The idea of running the script when opening the file is good.
To have built-in SMTP emailing you will need v10.

The script that actually does the emailing is in the attached snippet. Create this script first and test it to see that it runs correctly.

You will need to edit the details of who is emailed and your own SMTP email settings.

To make the script run when opening the database:
1. Open the FileMaker database.
2. Choose 'File Options...' from the file menu.
3. Turn on 'Perform script:' check box and specify your emailing script.

As discussed by lesouef above set up Windows Scheduler (unless you are on a Mac) to open your FileMaker database every day.

If the database is going to be opened and closed repeatedly each day then you don't want all the emailing to happen several times so I suggest a field that just hold whether emailed for that event or not which can be part of the IF check before emailing and then after emailing put "Yes" in the field with a 'Set Field' command.

If you want to do the processing on a 'workhorse' system and leave it alone to do it's job you wont need to use the Windows Scheduler and can just run it as in the demo. This may avoid any issues of a portable system trying to email all the time in situation with different SMTP settings or email availability.

Go to Layout [ Clients ] 
Show All Records 
Go to Record/Request/Page [ First ] 
Loop 
    If [ Get ( CurrentDate ) = TriggerSolution::BalanceDue ] 
    Send Mail [ Send via SMTP Server; To: TriggerSolution::Email; Subject: "Test"; Message: "You owe " &  
       TriggerSolution::BalanceDue; 
       Name: "You"; Email Address: "name@googlemail.com"; Reply-To Address: "name@googlemail.com"; SMTP Server: 
       "smtp. googlemail.com"; Port: 465; Use SSL; Authentication Type: Plain Password; 
       User Name: "name@googlemail.com" ] [ No dialog ] 
End If 
Go to Record/Request/Page [ Next; Exit after last ] 
End Loop 
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:

Select allOpen in new window

 

by: cogitivePosted on 2009-02-20 at 17:30:56ID: 23697812

I re-read the lesouef comment above which suggests a separate file to run the process which is a good idea and avoid re-running the opening script issue.

 

by: cogitivePosted on 2009-02-20 at 17:39:52ID: 23697839

Perhaps if you could confirm: are you on Windows or Mac or other? Could you have a 'workhorse' or would you prefer not to?

 

by: lesouefPosted on 2009-02-21 at 00:28:34ID: 23698945

if on mac, you use the cron feature to trigger actions.
If you have no script ability under osX, you can use the excellent cronX utility which has a GUI for the crontab setup file.

 

by: lesouefPosted on 2009-02-21 at 00:29:06ID: 23698947

sorry to be late on comments, but I sleep in Europe...

 

by: jazzviolinPosted on 2009-02-21 at 13:28:40ID: 23701875

I am on a Mac.  I'm attempting the solutions above.

 

by: lesouefPosted on 2009-02-22 at 00:24:13ID: 23703834

made a mistake up there, the GUI for crontab edition is "cronnix"
http://www.versiontracker.com/dyn/moreinfo/macosx/9478
let me know if help is still needed otherwise

 

by: lesouefPosted on 2009-03-23 at 17:02:56ID: 23963470

Solutions provided were valid, this is a classic question which is left over for me

 

by: jazzviolinPosted on 2009-03-23 at 17:07:46ID: 23963496

Okay I'm going to get back to this issue now.  Didn't know there was a time limit for paid subscriptions.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...