Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   7.6    Statistic  

UNNotification.SetCalendarTrigger

Sets a calendar based trigger.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
UNNotification 7.2 No No No No Yes

MBS( "UNNotification.SetCalendarTrigger"; UNNotificationRef { ; Year; Month; Day; Hour; Minute; Second; Repeat } )

Parameters

Parameter Description Example value
UNNotificationRef The reference number of the notification. $Notification
Year Optional
The year to use.
Can be empty.
Month Optional
The month to use.
Can be empty.
Day Optional
The day to use.
Can be empty.
Hour Optional
The hour to use.
Can be empty.
Minute Optional
The minute to use.
Can be empty.
Second Optional
The second to use.
Can be empty.
Repeat Optional
Whether to repeat.
Can be 1 to enable or 0 to disable. Default is 0.
0

Result

Returns OK or error.

Description

Sets a calendar based trigger.
Can be scheduled on the device to notify based on date and time values, and optionally repeat. For example, if a notification should be delivered at the next 8:00 AM then set the 'hour' parameter to 8. If the notification should be delivered every day at 8:00 AM then set repeats to 1.

Examples

Repeat daily 8am:

MBS( "UNNotification.SetCalendarTrigger"; $NotificationRef; ""; ""; ""; 8; ""; ""; 1 )

Schedule to show up 10:30 am every day:

# Create a new notification
Set Variable [$notification; Value:MBS("UNNotification.New")]
Set Variable [$r; Value:MBS( "UNNotification.SetTitle"; $Notification; "Hello World")]
# Set calendar trigger:
Set Variable [$r; Value:MBS( "UNNotification.SetCalendarTrigger"; $Notification; ""; ""; ""; 10; 30; ""; 1 )]
# and schedule
Set Variable [$r; Value:MBS("UNNotification.Schedule"; $notification; "test")]

See also


UNNotification.SetBody   -   UNNotification.SetCategoryIdentifier

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins