Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

ProcessActivity.beginActivity

Begins an activity.

Component Version macOS Windows Linux Server iOS SDK
Process 5.2 ✅ Yes ✅ Yes ❌ No ✅ Yes, on macOS and Windows ✅ Yes
MBS( "ProcessActivity.beginActivity"; activity { ; Reason } )   More

Parameters

Parameter Description Example Flags
activity The activity as a number or a text. The plugin allows you to pass texts like IdleDisplaySleepDisabled, IdleSystemSleepDisabled, UserInitiated, UserInitiatedAllowingIdleSystemSleep, Background and LatencyCritical. Those texts can be combined. "IdleDisplaySleepDisabled"
Reason The reason text.
May appear in a log for macOS.
"Doing backup" Optional

Result

Returns reference number or error.

Description

Begins an activity.
Pass in an activity to this function, and a non-empty reason string. Indicate completion of the activity by calling the corresponding ProcessActivity.endActivity function with the result of this function. The reason string is used for debugging.
Requires macOS 10.9 and newer.
This function allows to deactivate App Nap for FileMaker. So when a script has to do some work, you can disable system/display sleep here which also disables app nap.

Added Windows support with version 13.0. Supported flags are IdleDisplaySleepDisabled, IdleSystemSleepDisabled, UserInitiated and UserInteractive.

See also iOSApp.SetIdleTimerDisabled function.

Examples

Start an activity:

MBS( "ProcessActivity.beginActivity"; "IdleSystemSleepDisabled UserInitiated"; "Doing Backup in FileMaker" )

Avoid display sleep:

MBS( "ProcessActivity.beginActivity"; "IdleDisplaySleepDisabled UserInitiated"; "Showing animation" )

See also

Release notes

Example Databases

Blog Entries

This function is free to use.

Created 2nd June 2015, last changed 19th June 2023


ProcessActivity.Reason - ProcessActivity.endActivity