Dela via


Contains Function

Query function that evaluates whether the string contains the specified string.

Parameters

Parameters allow for data to be passed to the query function.

Name Type Nullable Unicode Description
PropertyName
Edm.String False False

The string to evaluate.

PropertyValue
Edm.String False False

The value of the string.

Syntax example

?$filter=Microsoft.Dynamics.CRM.Contains(PropertyName=@p1,PropertyValue=@p2)&@p1='name'&@p2='value'

Remarks

Only use this function with columns that are enabled for full-text indexing. In a Microsoft Dynamics 365 default installation, only the columns of the KBArticle (article) entity are enabled for full-text indexing.

If you use this with a column that doesn't support full-text indexing, you will get the following error:

HTTP/1.1 400 Bad Request
Content-Type: application/json; odata.metadata=minimal
OData-Version: 4.0

{
    "error": {
        "code": "0x80041120",
        "message": "Unknown Condition Operator: Contains. FetchXml does not support it"
    }
}

Use the OData contains function instead.

See also