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.

Trigger a Script from a Field Change.

Featured Replies

I have been stumped on how to have a script trigger when a field has changed. I want the script to be able to trigger without a user entering or leaving a field (meaning it should work with the database unattended).

 

Here is the scenario: When a date in a date field equals today a script is triggered to send an email.

 

Seems like it should be pretty simple, but I have not found a solution yet. Set Script Triggers will not work because it requires a user to exit the field for the script to run.

 

Thanks in Advance for your Help - Sam

How is the field changed then if the user does not do it?

 

If it is part of a scripted workflow, let the script take care of the email sending.  You definitely do not want triggers for this.  Triggers are for handling user-level events and in your case you don't have one to handle.

 

An alternate approach would be to create a server-side script to find updated records and loop through them and send the email.  Then put that on a schedule.

Example: I have a member whose trial is up on a certain date. I want that end date to automatically trigger a script that sends an email to that member (this is connected to a MYSQL on Wordpress).

 

Thanks Wim for your help - Sam

 want that end date to automatically trigger a script that sends an email 

 

But how?  A trigger is based on an event that the user does.

 

It sounds like all you need is a nightly server-side schedule that does a find and loops through the found set to send an email.

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.