contains( )

Refines a query or filter to match items whose specified property value contains a specified string.

The contains() function refines a WixDataQuery or WixDataFilter to only match items where the value of the specified property contains the specified string. Matching with contains() is not case sensitive, so "text" does contain "Tex".

You can use contains() with a property whose value is a String or a Reference. For properties of type reference it is recommended that you use the eq() function instead of contains(). With properties that are References, contains() matches by the ID of the referenced item as a String.

Method Declaration
Method Parameters

The property whose value will be compared with the string.


The string to look for inside the specified property value.

Was this helpful?