WindowsUserNotification.SetFileName
-----------------------------------

Sets the file name for script trigger.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WindowsUserNotification](component_WindowsUserNotification.md) [UserNotification](component_UserNotification.md) | [7.2](newinversion72.md) | ❌ No | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "WindowsUserNotification.SetFileName"; Notification; FileName ) 

**MBS**( **"WindowsUserNotification.SetFileName";** /\* Sets the file name for script trigger. \*/  
**$Notification**; /\* The reference number for the Windows User Notification. \*/   
**$FileName**) /\* The database file name where the script is located.e.g. "test.fmp12" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Notification | The reference number for the Windows User Notification. | $Notification |
| FileName | The database file name where the script is located. | "test.fmp12" |

### Result

Returns OK or error.

### Description

Sets the file name for script trigger.  
The parameter to the script includes a list of values. First entry in the list is the notification reference number. Second entry is the reason to call which can be Activated, Dismissed or Failed. Third value is reason for demission or error code for failure.  
### Examples

Set which script to trigger:

 Set Variable \[ $r ; Value:MBS ( "[WindowsUserNotification.SetScriptName](WindowsUserNotificationSetScriptName.md)"; $ID ; "NotificationTrigger") \]  
Set Variable \[ $r ; Value:MBS ( "WindowsUserNotification.SetFileName"; $ID ; Get(FileName)) \]  
### See also

- [WindowsUserNotification.GetFileName](WindowsUserNotificationGetFileName.md)
- [WindowsUserNotification.GetScriptName](WindowsUserNotificationGetScriptName.md)
- [WindowsUserNotification.NewNotification](WindowsUserNotificationNewNotification.md)
- [WindowsUserNotification.Release](WindowsUserNotificationRelease.md)
- [WindowsUserNotification.SetImagePath](WindowsUserNotificationSetImagePath.md)
- [WindowsUserNotification.SetPriority](WindowsUserNotificationSetPriority.md)
- [WindowsUserNotification.SetRemoteId](WindowsUserNotificationSetRemoteId.md)
- [WindowsUserNotification.SetScriptName](WindowsUserNotificationSetScriptName.md)
- [WindowsUserNotification.SetTag](WindowsUserNotificationSetTag.md)
- [WindowsUserNotification.Setting](WindowsUserNotificationSetting.md)

### Example Databases

- [Win Only/Windows User Notifications](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Win%20Only/Windows%20User%20Notifications.shtml#2ScriptAnchor_)

This function is free to use.

Created 2nd April 2017 , last changed 20th May 2025

  
[WindowsUserNotification.SetExpiresOnReboot](WindowsUserNotificationSetExpiresOnReboot.md) - [WindowsUserNotification.SetGroup](WindowsUserNotificationSetGroup.md)

[HTML Version](WindowsUserNotificationSetFileName.shtml)