ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Workflow.Models Namespace / JobsManager Class / ExecuteQuery Method / ExecuteQuery(String) Method
The name of the query to execute
Example

In This Topic
    ExecuteQuery(String) Method
    In This Topic
    Executes a query by name and return the QueryResult. This method must be called on the MCT. Use QueuedTask.Run
    Syntax
    public QueryResult ExecuteQuery( 
       string queryName
    )
    Public Overloads Function ExecuteQuery( _
       ByVal queryName As String _
    ) As QueryResult

    Parameters

    queryName
    The name of the query to execute

    Return Value

    A QueryResult that defines the query results
    Example
    How to execute a Query
    // ExecuteQuery returns a query result
    // Its passed either an ID or a name
    var wfCon = await WorkflowModule.ConnectAsync();
    var jobManager = wfCon.GetManager<JobsManager>();
    var queryResultReturn = jobManager.ExecuteQuery("All Jobs");
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also