SmartCard.SplitValues
---------------------

Split values read from smart card.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SmartCard](component_SmartCard.md) | [8.5](newinversion85.md) | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes, on macOS and Windows | ❌ No |

MBS( "SmartCard.SplitValues"; Input ) 

**MBS**( **"SmartCard.SplitValues";** /\* Split values read from smart card. \*/  
**$Input**) /\* The hex encoded input string. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Input | The hex encoded input string. |  |

### Result

Returns JSON or error.

### Description

Split values read from smart card.  
Files on smartcard can contain key/value data.  
Returns JSON with an object containing numbers as text (key) and values as text.  
  
Sample for JSON result:  
  
{  
| "128": | "MILLER, JOE", |
|---|---|
| "130": | "19651201", |
| "131": | "123456789012", |
| "132": | "\\u0001" |

}  
Starting with version 10.0 we hex encode binary data instead of assuming it's UTF-8.  
### Examples

Split file data:

 Set Variable \[ $json ; Value: MBS ("SmartCard.SplitValues"; Card::FileData ) \]   
If \[ MBS ("IsError") \]   
 Set Field \[ Card::JSON ; "" \]   
Else  
 Set Field \[ Card::JSON ; MBS ("[JSON.Colorize](JSONColorize.md)"; $json ) \]   
End If  
### See also

- [IsError](IsError.md)
- [JSON.Colorize](JSONColorize.md)
- [SmartCard.Init](SmartCardInit.md)
- [SmartCard.ReadFile](SmartCardReadFile.md)

### Release notes

- **Version 10.0**
    - Changed [SmartCard.SplitValues](https://www.mbsplugins.eu/SmartCardSplitValues.shtml) to hex encode binary values.
- **Version 8.5**
    - Added [SmartCard.ReadFile](http://www.mbsplugins.eu/SmartCardReadFile.shtml) and [SmartCard.SplitValues](http://www.mbsplugins.eu/SmartCardSplitValues.shtml) functions to read data from various smartcards (e.g. Swiss Health Insurance Card or Belgian Identity Card).

### Example Databases

- [SmartCard/Belgian EID Reader](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/SmartCard/Belgian%20EID%20Reader.shtml#2ScriptAnchor_)
- [SmartCard/SmartCard ReadFile](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/SmartCard/SmartCard%20ReadFile.shtml#12ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 9.6pr2](https://www.mbsplugins.de/archive/2019-12-10/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)
- [Read patient name from Swiss Health Card](https://www.mbsplugins.de/archive/2019-03-08/Read_patient_name_from_Swiss_H/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.5pr3](https://www.mbsplugins.de/archive/2018-10-24/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 19th October 2018 , last changed 6th December 2019

  
[SmartCard.SetAttribute](SmartCardSetAttribute.md) - [SmartCard.Status](SmartCardStatus.md)

[HTML Version](SmartCardSplitValues.shtml)