Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

all about emails

Featured Replies

I realise I know very little about FM. I am trying without success to develop an email function. I have a field that calculates the days "overdue" following a "due date" that is entered for something to happen. The field looks at today's date and shows a negative number if there is still time to go and a positive number if it is overdue. I want the program to email me when there is, say, 10 days remaining before the due date if the action has not been completed.

I understand how to save a copy of the record in PDF and then to tell it to email that record, but how do I initiate it? Can it send the file and the email without the program being opened and running? If the critical time for sending the email is on a weekend and I am not in the office to open the program, how would it happen?

Would someone please look at the script I tried (it did not work) and let me know where I am going wrong please, and help me to set up the necessary commands to make it so? Thanks..

If[Days Overdue -10]

Save records as PDF[Restore; no dialog; "Due.pdf";Automatically open;create email;Current record]

Send Mail[No dialog; to:"[email protected]"; subject:"Watch out";Message:"Warned you"; "Due.pdf"]

End if

Hi,

Are you using FMP8? If so, this worked for me:

If[Days Overdue -10]

Save records as PDF[Restore; no dialog; "Due.pdf";Automatically open;Current record]

Send Mail[No dialog; to:"[email protected]"; subject:"Watch out";Message:"Warned you"; "Due.pdf"]

End if

I removed the "create e-mail" option in "Save records as PDF". I do however get a security warning "A program is trying to automatically send an e-mail on your behalf", which requires a user prompt (there are third party add-ins that can turn this off, just Google the warning message and you will find them).

If you want this script to run 24/7 then your FMP will have to run 24/7 as well. You could create a loop, but the most reliable way to fire a script for me turned out to be to use a third party tool of which there are a few. I personally use Dacons Scriptfire.

Peter

  • Author

Thanks for the help, it is appreciated. What do I do with this script (it is a script?). How do I associate it with the field and make it run? Do I make it a calculation field? Or will the script just run if I store it in the scripts list? Pardon me for my iggerence, I tell people there is no such thing as a stupid question but maybe this disproves that statement!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.