QuickList.HasValue
------------------

Checks whether a list contains a given value.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [List](component_List.md) | [5.0](newinversion50.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "QuickList.HasValue"; ListRef; Value ) 

**MBS**( **"QuickList.HasValue";** /\* Checks whether a list contains a given value. \*/  
**$ListRef**; /\* The reference to the list returned from [QuickList.New](QuickListNew.md) function.e.g. $List \*/   
**$Value**) /\* The value to check.e.g. "Hello" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| ListRef | The reference to the list returned from [QuickList.New](QuickListNew.md) function. | $List |
| Value | The value to check. | "Hello" |

### Result

Returns 1, 0 or error.

### Description

Checks whether a list contains a given value.  
Returns 1 if value is found or 0 if not. Text comparison is case sensitive.  
### Examples

Checks if list contains value:

 Set Variable \[$q ; Value:MBS ("[QuickList.New](QuickListNew.md)"; "Hello¶World")\]  
Show Custom Dialog \["Contains World"; MBS ("QuickList.HasValue"; $q ; "World")\]  
Show Custom Dialog \["Contains Test"; MBS ("QuickList.HasValue";$q ; "Test")\]  
Set Variable \[$r ; Value:MBS ("[QuickList.Release](QuickListRelease.md)"; $q )\]  
### See also

- [List.HasValue](ListHasValue.md)
- [QuickList.AddValue](QuickListAddValue.md)
- [QuickList.GetValue](QuickListGetValue.md)
- [QuickList.HasValues](QuickListHasValues.md)
- [QuickList.InsertValue](QuickListInsertValue.md)
- [QuickList.New](QuickListNew.md)
- [QuickList.Release](QuickListRelease.md)
- [QuickList.SetValue](QuickListSetValue.md)

### Release notes

- **Version 14.2**
    - Added [QuickList.HasValues](https://www.mbsplugins.eu/QuickListHasValues.shtml) and [Dictionary.HasKeys](https://www.mbsplugins.eu/DictionaryHasKeys.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 6.1pr2](https://www.mbsplugins.de/archive/2016-02-10/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 4.5pr1](https://www.mbsplugins.de/archive/2014-11-24/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 12nd November 2014 , last changed 14th December 2023

  
[QuickList.HasDuplicateItems](QuickListHasDuplicateItems.md) - [QuickList.HasValues](QuickListHasValues.md)

[HTML Version](QuickListHasValue.shtml)