ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / SubtypeGroupLayer Class / IsValidDefinitionQuery Method / IsValidDefinitionQuery(DefinitionQuery) Method
The definition query to check.

In This Topic
    IsValidDefinitionQuery(DefinitionQuery) Method
    In This Topic
    Determines if the specified definitionQuery is valid. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public Task<bool> IsValidDefinitionQuery( 
       DefinitionQuery definitionQuery
    )
    Public Overloads Function IsValidDefinitionQuery( _
       ByVal definitionQuery As DefinitionQuery _
    ) As Task(Of Boolean)

    Parameters

    definitionQuery
    The definition query to check.

    Return Value

    True if valid.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    This method does not check whether records will be returned from the definitionQuery; just whether the query where clause has valid syntax for the layer and the spatial filter (if defined) is valid.
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.8 or higher.
    See Also