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

Auto generate email from portal info

Featured Replies

Hi! I have a real estate database that records all visits to a poperty in a portal. There are fields for date and agent name among others. I would like to create a script that automatically generates an email (from an external email program, in this case mail.app) with the agents name in the to: field and a stock comment like "how did the showing go" in the subject and email. The script should be triggered 24 hours after the date of the showing. Any help would be appreciated!

  • Author

Oh, I should add that I know how to create the email with a script, my problem is working out the "trigger" to cause the email script to be performed. Thanks for your time!

I use a Plug-In for this type of thing..Troi Activator. http://www.troi.com

It has MANY other uses you might find valuable.

Edited by Guest

  • Author

Thanks MelJ, I'll look into that, but at the moment I would rather try to make it work with a script, I think I am stumbling over an if statement (I'm a novice!!)

I have created a yes/no field to confirm wether an email has been sent. Basically I need a script that says:

If the showing date is earlier than the current date, and the email confirmation field is set to no, then run the send email script, if not move to the next showing and repeat.

I have created the "send email script" and that works, it's the trigger that isn't. This seems pretty straightforward, but I think I am getting stuck with the syntax of it all.

Any ideas?

Thanks

I'm no expert by any stretch but as far as I know FileMaker cannot run scheduled tasks.

The script should be triggered 24 hours after the date of the showing.

If you are running server, it will run scheduled tasks but only from the server not from a client.

I'd put the calling of your script in the Open Script. So, on login, the system would go to the Visits table and find all visits where the flag_NeedEmail is equal to 1. The flag_NeedEmail = if (emailsent="No" and date_visit < get (currentdate)). This is an unstored calc, so finding on it will be a bit slow. You could find on emailsent="No" and then Constrain found set on flag_NeedEmail.

By the way, why not store emailSent_date rather than a Yes / No?

  • 4 weeks later...
  • Author

Thanks for the info, and apologies for my delay in sending that thanks! I shall give the above a go and see if I can get it to work. I was thinking along the lines of a "log on" script, but shall have to see how much that slows down the start up.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.