ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / SubtypeGroupLayer Class / IsValidDefinitionQuery Method / IsValidDefinitionQuery(String) Method
The SQL clause to check.

In This Topic
    IsValidDefinitionQuery(String) Method
    In This Topic
    Determines if the specified SQL where clause has valid syntax. That is; the field defined exists on the layer. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public Task<bool> IsValidDefinitionQuery( 
       string sql
    )
    Public Overloads Function IsValidDefinitionQuery( _
       ByVal sql As String _
    ) As Task(Of Boolean)

    Parameters

    sql
    The SQL clause 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 SQL query; just whether the query has valid syntax for the layer.
    Requirements

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

    ArcGIS Pro version: 3.8 or higher.
    See Also