ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Workflow.Client.Models Namespace / IJobsManager Interface / CalculateJobStatistics Method
The query used to search for jobs
Example

In This Topic
    CalculateJobStatistics Method
    In This Topic
    Returns the count of total records that match the query results provided in the query.
    Syntax
    JobStatistics CalculateJobStatistics( 
       JobStatisticsQuery query
    )
    Function CalculateJobStatistics( _
       ByVal query As JobStatisticsQuery _
    ) As JobStatistics

    Parameters

    query
    The query used to search for jobs
    Example
    QueuedTask.Run(() => { var query = new JobStatisticsQuery() { // Get high priority jobs Q = "\"assignedType='User' AND closed=0 AND assignedTo='\" + $currentUser + \"' \" + \" AND priority='High'\"" }; var totalJobs = WorkflowClientModule.JobsManager.CalculateJobStatistics(query).Total; });
    Get statistics for jobs
    var query = new JobStatisticsQuery()
    {
      // Search for open jobs assigned to users
      Q = "\"assignedType='User' AND closed=0 \""
    };
    var jobManager = WorkflowClientModule.JobsManager;
    var results = jobManager.CalculateJobStatistics(query);
    var totalJobs = results.Total;
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.2 or higher.
    See Also