Matrix.Lookup
-------------

Queries value without errors.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Matrix](component_Matrix.md) | [13.5](newinversion135.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Matrix.Lookup" { ; MatrixRef; Row; Column; Default Value } ) 

**MBS**( **"Matrix.Lookup"** /\* Queries value without errors. \*/  
**$MatrixRef**; /\* Optional; The matrix reference number. e.g. $matrix \*/   
**$Row**; /\* Optional; The zero based row number.  
Default is zero. e.g. 2 \*/   
**$Column**; /\* Optional; The zero based column number.  
Default is zero. e.g. 2 \*/   
**$Default Value**) /\* Optional; The default value to return in case of an error. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| MatrixRef | The matrix reference number. | $matrix | Optional |
| Row | The zero based row number.   Default is zero. | 2 | Optional |
| Column | The zero based column number.   Default is zero. | 2 | Optional |
| Default Value | The default value to return in case of an error. |  | Optional |

### Result

Returns value or default value.

### Description

Queries value without errors.  
Retains original data type.  
See also [Matrix.GetValue](MatrixGetValue.md) function.  
### Examples

Try without parameters:

 MBS ("Matrix.Lookup")  
Try with invalid row and column value:

 let(\[  
m = MBS ("[Matrix.New](MatrixNew.md)"; 3; 3);  
r = MBS ("Matrix.Lookup"; m; 5; 5; "test")  
\]; r)  
<small>  
Example result: test</small>Try with correct row and column:

 let(\[  
m = MBS ("[Matrix.New](MatrixNew.md)"; 3; 3);  
s = MBS ("[Matrix.SetValue](MatrixSetValue.md)"; m; 2; 2; "value");  
r = MBS ("Matrix.Lookup"; m; 2; 2; "test")  
\]; r)  
<small>  
Example result: value</small>### See also

- [Matrix.GetValue](MatrixGetValue.md)
- [Matrix.New](MatrixNew.md)
- [Matrix.SetValue](MatrixSetValue.md)

### Release notes

- **Version 13.5**
    - Added [Matrix.Lookup](https://www.mbsplugins.eu/MatrixLookup.shtml) function to get a value without error for invalid parameters.

### Blog Entries

- [New in MBS FileMaker Plugin 13.5](https://www.mbsplugins.de/archive/2023-11-28/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [Data structures in MBS Plugin](https://www.mbsplugins.de/archive/2023-11-27/Data_structures_in_MBS_Plugin/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 13.5 für Claris FileMaker](https://www.mbsplugins.de/archive/2023-11-07/Neues_MBS_Plugin_135_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 13.5 for Claris FileMaker](https://www.mbsplugins.de/archive/2023-11-07/MBS_Plugin_135_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.5pr1](https://www.mbsplugins.de/archive/2023-09-26/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 24th September 2023 , last changed 24th September 2023

  
[Matrix.List](MatrixList.md) - [Matrix.MBS](MatrixMBS.md)

[HTML Version](MatrixLookup.shtml)