Product Logo

MMScript

Trigger and schedule scripts

Functions

MMScript_CreateDateTimeScriptEvent

NameMMScript_CreateDateTimeScriptEvent
Description

Use this function to create a Script Event that occurs at a specific date and/or time in the fututre.

Return TypeText
FormatMMScript_CreateDateTimeScriptEvent ( EventName ; Script ; DateTime ; DB ; EventValue ; Persistent ; Priority ; CurrentScript )
Required Parameters
EventName

The Name of the Event you are Creating.

Script

The Script to call.

DateTime

A Date, Time, or Timestamp of when you want the Event to occur. If you are passing a text string to this parameter, you may need to convert it using either GetAsDate(), GetAsTime(), or GetAsTimestamp(). See the examples section to see what this looks like.

Optional Parameters
DB

The Database that contains the Script.

EventValue

Any user defined Value you can retrieve when the Event occurs.

Persistent

True or False if you want this Event to be saved between FileMaker sessions.

Priority

Defines how interruptive the Event is. (Specify “Low”, “Normal”, “High”, or “Highest”.)

Low - The Event occurs if the user has not done anything for 30 seconds or more.

Normal - The Event may occur even if the user has done something within the last 30 seconds, but no script is running.

High - The Event may occur if the user is running a script that is currently paused.

Highest - The Event attempts to run even if there is already a script running.

CurrentScript

Defines what to do with the currently running script (if any). (Specify “Halt”, “Exit”, “Resume”, or “Pause”.)

Example
Example 1

Creates an event named "My Event" to call the "My Script" script at 9/8/2011 3:49:35 PM. FileMaker's GetAsTimestamp() function is used to turn the text string of "9/8/2011 3:49:35 PM" into a timestamp. GetAsDate() and GetAsTime() can also be used here if you only want to specify a Date or Time.

MMScript_CreateDateTimeScriptEvent ( "My Event"; "My Script" ; GetAsTimestamp("9/8/2011 3:49:35 PM") )