ESRI.ArcGIS.ADF.Tasks
CustomWhereExpression Property
See Also 
ESRI.ArcGIS.ADF.Tasks Namespace > QueryAttributes Class : CustomWhereExpression Property




Whether a customized where expression has been created for the query.

Syntax

Visual Basic (Declaration) 
Public Property CustomWhereExpression As Boolean
Visual Basic (Usage)Copy Code
Dim instance As QueryAttributes
Dim value As Boolean
 
instance.CustomWhereExpression = value
 
value = instance.CustomWhereExpression
C# 
public bool CustomWhereExpression {get; set;}

Remarks

This property will be true if, in the Visual Studio design editor for the query, the developer has checked the box for "Custom Where Expression". This enables the developer to modify the standard query expression created with the Form Entry Editor (which opens when the Add or Edit link is clicked in the query editor). If this property is false, then the Where Expression format String will be grayed out and read-only, since the where expression is generated directly from the Query Entries added to the task editor.

The custom where expression editor allows entering more complex where expressions not supported with the standard query entries editor. For example, the standard form entry does not support wildcard characters for LIKE expressions. In order to support a LIKE query, the custom where expression could be modified from, for example:

NAME like '{0}'

to:

NAME like '{0}%'

so that features whose field value (NAME) that begin with the value that the user enters will be selected. Another example of using a custom where expression is when using multiple query entries. The default form will use the AND operator to concatenate the multiple entries. In order to use other operators, such as an OR operator (to select features that match either form entry), a custom where expression must be used.

For a query task configured in Manager, this property will be false, since Manager does not currently support creating custom where expressions.

See Also

© 2010 All Rights Reserved.