WindowsUserNotification.NewNotification
---------------------------------------

Creates a new notification.

| 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.NewNotification" ) ### Parameters

none

### Result

Returns reference number or error.

### Description

Creates a new notification.  
Returns an identifier which must be passed to other functions and later to [WindowsUserNotification.Release](WindowsUserNotificationRelease.md).  
### Examples

Create new notification:

 Set Variable \[$r ; Value:MBS ( "WindowsUserNotification.NewNotification")\]  
If \[MBS ("IsError")\]  
 Show Custom Dialog \["Error"; $r \]  
Else  
 Set Field \[Windows User Notifications::ID ; $r \]  
 Set Variable \[$r ; Value:MBS ( "[WindowsUserNotification.SetImagePath](WindowsUserNotificationSetImagePath.md)"; Windows User Notifications::ID ; Windows User Notifications::ImagePath )\]  
 Set Variable \[$r ; Value:MBS ( "[WindowsUserNotification.SetText](WindowsUserNotificationSetText.md)"; Windows User Notifications::ID ; 0; Windows User Notifications::Text1 )\]  
 Set Variable \[$r ; Value:MBS ( "[WindowsUserNotification.SetText](WindowsUserNotificationSetText.md)"; Windows User Notifications::ID ; 1; Windows User Notifications::Text2 )\]  
 Set Variable \[$r ; Value:MBS ( "[WindowsUserNotification.SetText](WindowsUserNotificationSetText.md)"; Windows User Notifications::ID ; 2; Windows User Notifications::Text3 )\]  
 Set Variable \[$r ; Value:MBS ( "[WindowsUserNotification.SetText](WindowsUserNotificationSetText.md)"; Windows User Notifications::ID ; 3; Windows User Notifications::Text4 )\]  
 Set Variable \[$r ; Value:MBS ( "[WindowsUserNotification.SetScriptName](WindowsUserNotificationSetScriptName.md)"; Windows User Notifications::ID ; "Trigger")\]  
 Set Variable \[$r ; Value:MBS ( "[WindowsUserNotification.SetFileName](WindowsUserNotificationSetFileName.md)"; Windows User Notifications::ID ; Get(FileName))\]  
End If  
### See also

- [IsError](IsError.md)
- [UserNotification.Release](UserNotificationRelease.md)
- [WindowsUserNotification.HideNotification](WindowsUserNotificationHideNotification.md)
- [WindowsUserNotification.Release](WindowsUserNotificationRelease.md)
- [WindowsUserNotification.SetFileName](WindowsUserNotificationSetFileName.md)
- [WindowsUserNotification.SetImagePath](WindowsUserNotificationSetImagePath.md)
- [WindowsUserNotification.SetNotificationMirroring](WindowsUserNotificationSetNotificationMirroring.md)
- [WindowsUserNotification.SetScriptName](WindowsUserNotificationSetScriptName.md)
- [WindowsUserNotification.SetText](WindowsUserNotificationSetText.md)
- [WindowsUserNotification.ShowNotification](WindowsUserNotificationShowNotification.md)

### Example Databases

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

### Blog Entries

- [MBS FileMaker Advent calendar - Door 17 - User Notifications](https://www.mbsplugins.de/archive/2024-12-17/MBS_FileMaker_Advent_calendar_/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 2nd April 2017 , last changed 9th November 2021

  
[WindowsUserNotification.List](WindowsUserNotificationList.md) - [WindowsUserNotification.Release](WindowsUserNotificationRelease.md)

[HTML Version](WindowsUserNotificationNewNotification.shtml)