Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

QuickList.HasValue

Checks whether a list contains a given value.

Component Version macOS Windows Linux Server iOS SDK
List 5.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "QuickList.HasValue"; ListRef; Value )   More

Parameters

Parameter Description Example
ListRef The reference to the list returned from QuickList.New 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"; "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"; $q)]

See also

Blog Entries

This function checks for a license.

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


QuickList.HasDuplicateItems - QuickList.IndexOfFirstValueMatching