UNNotification.SetNFCScript
---------------------------

Sets NFC trigger script.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [UNNotification](component_UNNotification.md) | [9.4](newinversion94.md) | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "UNNotification.SetNFCScript"; FileName; ScriptName ) 

**MBS**( **"UNNotification.SetNFCScript";** /\* Sets NFC trigger script. \*/  
**$FileName**; /\* The database file name where the script is located.e.g. "test.fmp12" \*/   
**$ScriptName**) /\* The script name.e.g. "MyScript" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| FileName | The database file name where the script is located. | "test.fmp12" |
| ScriptName | The script name. | "MyScript" |

### Result

Returns OK or error.

### Description

Sets NFC trigger script.  
If you use Background Tag Reading for NFC tags with CoreNFC framework, you can call this function in start script to define the script to trigger.  
  
You need to add an associated domain to your iOS application.  
See  
[https://developer.apple.com/documentation/security/password\_autofill/setting\_up\_an\_app\_s\_associated\_domains](https://developer.apple.com/documentation/security/password_autofill/setting_up_an_app_s_associated_domains)  
### Examples

Sets action script:

 MBS ( "UNNotification.SetNFCScript"; Get(Filename); "NFC Detected" )  
### See also

- [UNNotification.GetDescription](UNNotificationGetDescription.md)
- [UNNotification.SetActionScript](UNNotificationSetActionScript.md)
- [UNNotification.SetScript](UNNotificationSetScript.md)

### Release notes

- **Version 9.4**
    - Added [UNNotification.SetNFCScript](http://www.mbsplugins.eu/UNNotificationSetNFCScript.shtml) function for background scanning with URL trigger in NFC card for iOS.

### Blog Entries

- [Neue Funktionen des MBS FileMaker Plugin 9.4](https://www.mbsplugins.de/archive/2019-10-05/Neue_Funktionen_des_MBS_FileMa/monkeybreadsoftware_blog_filemaker)
- [Neues MBS FileMaker Plugin 9.4](https://www.mbsplugins.de/archive/2019-09-17/Neues_MBS_FileMaker_Plugin_94/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 9.4 - More than 5900 Functions In One Plugin](https://www.mbsplugins.de/archive/2019-09-17/MBS_FileMaker_Plugin_94_-_More/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 9.4pr2](https://www.mbsplugins.de/archive/2019-08-19/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 14th August 2019 , last changed 15th August 2019

  
[UNNotification.SetLocationTrigger](UNNotificationSetLocationTrigger.md) - [UNNotification.SetScript](UNNotificationSetScript.md)

[HTML Version](UNNotificationSetNFCScript.shtml)