You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: "Test for a null value (Common Data Service) | Microsoft Docs"# Intent and product brand in a unique string of 43-59 chars including spaces
3
+
description: "This sample shows how to test for a null value by using the FilterExpression and QueryByAttribute classes"
4
+
ms.custom: ""
5
+
ms.date: 05/03/2019
6
+
ms.reviewer: ""
7
+
ms.service: powerapps
8
+
ms.topic: "article"
9
+
author: "KumarVivek"# GitHub ID
10
+
ms.author: "kvivek"# MSFT alias of Microsoft employees only
11
+
manager: "amyla"# MSFT alias of manager or PM counterpart
12
+
search.audienceType:
13
+
- developer
14
+
search.app:
15
+
- PowerApps
16
+
- D365CE
17
+
---
18
+
19
+
# Test for a null value
20
+
21
+
The following code example shows how to test for a null value by using the <xref:Microsoft.Xrm.Sdk.Query.FilterExpression> and <xref:Microsoft.Xrm.Sdk.Query.QueryByAttribute> classes.
22
+
23
+
## Example
24
+
Use this code to test for equality by using the <xref:Microsoft.Xrm.Sdk.Query.FilterExpression> class.
Copy file name to clipboardExpand all lines: powerapps-docs/developer/common-data-service/org-service/use-querybyattribute-class.md
+45-3Lines changed: 45 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
---
2
2
title: "Use the QueryByAttribute class (Common Data Service) | Microsoft Docs"# Intent and product brand in a unique string of 43-59 chars including spaces
3
-
description: "<Description>"# 115-145 characters including spaces. This abstract displays in the search result.
3
+
description: "You can use the QueryByAttribute class to build queries that test a set of attributes against a set of values"
You can use the <xref:Microsoft.Xrm.Sdk.Query.QueryByAttribute> class to build queries that test a set of attributes against a set of values. Use this class with the <xref:Microsoft.Xrm.Sdk.IOrganizationService.RetrieveMultiple*> method or the <xref:Microsoft.Xrm.Sdk.IOrganizationService>.<xref:Microsoft.Xrm.Sdk.Messages.RetrieveMultipleRequest> method.
22
+
23
+
The following table lists the properties that you can set to create a query expression using the <xref:Microsoft.Xrm.Sdk.Query.QueryByAttribute> class.
24
+
25
+
|Property|Description|
26
+
|--------------|-----------------|
27
+
|<xref:Microsoft.Xrm.Sdk.Query.QueryByAttribute.EntityName>|Specifies which type of entity is retrieved. A query expression can only retrieve a collection of one entity type. You can also pass this value by using the <xref:Microsoft.Xrm.Sdk.Query.QueryExpression> constructor.|
28
+
|<xref:Microsoft.Xrm.Sdk.Query.QueryByAttribute.ColumnSet>|Specifies the set of attributes (columns) to retrieve.|
29
+
|<xref:Microsoft.Xrm.Sdk.Query.QueryByAttribute.Attributes>|Specifies the set of attributes selected in the query.|
30
+
|<xref:Microsoft.Xrm.Sdk.Query.QueryByAttribute.Values>|Specifies the attribute values to look for when the query is executed.|
31
+
|<xref:Microsoft.Xrm.Sdk.Query.QueryByAttribute.Orders>|Specifies the order in which the records are returned from the query.|
32
+
|<xref:Microsoft.Xrm.Sdk.Query.QueryByAttribute.PageInfo>|Specifies the number of pages and the number of records per page returned from the query.|
33
+
34
+
The following code example shows how to use the `QueryByAttribute` class.
0 commit comments