CUPS.GetJobsCount
-----------------

Selects some jobs and returns the count of jobs found.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CUPS](component_CUPS.md) | [2.5](newinversion25.md) | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ❌ No |

### Deprecated

This function was [deprecated](deprecated.md). Use [CUPS.GetJobsAsJSON](CUPSGetJobsAsJSON.md) instead.

MBS( "CUPS.GetJobsCount" { ; Name; OnlyMyJobs; whichJobs } ) 

**MBS**( **"CUPS.GetJobsCount";** /\* Selects some jobs and returns the count of jobs found. \*/  
**$Name**; /\* Optional; Name of the printer queue to query.   
If no name or empty string is specified, we get all queues.e.g. "Brother\_DCP\_8085DN" \*/   
**$OnlyMyJobs**; /\* Optional; Pass either "my" for your users jobs or "all" for all jobs.e.g. "all" \*/   
**$whichJobs**) /\* Optional; Pass "active" to get only active jobs, "all" for all jobs or "complete" for completed jobs.e.g. "complete" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Name | Name of the printer queue to query.    If no name or empty string is specified, we get all queues. | "Brother\_DCP\_8085DN" | Optional |
| OnlyMyJobs | Pass either "my" for your users jobs or "all" for all jobs. | "all" | Optional |
| whichJobs | Pass "active" to get only active jobs, "all" for all jobs or "complete" for completed jobs. | "complete" | Optional |

### Result

The number of jobs found.

### Description

Selects some jobs and returns the count of jobs found.  
First call this function to build job list. Then call other GetJob\* functions to query values.  
  
With indexes from 0 to count-1, you can call the other functions [CUPS.GetJobState](CUPSGetJobState.md), [CUPS.GetJobCompletionTime](CUPSGetJobCompletionTime.md), [CUPS.GetJobCreationTime](CUPSGetJobCreationTime.md), [CUPS.GetJobProcessingTime](CUPSGetJobProcessingTime.md), [CUPS.GetJobPrinter](CUPSGetJobPrinter.md), [CUPS.GetJobID](CUPSGetJobID.md), [CUPS.GetJobTitle](CUPSGetJobTitle.md), [CUPS.GetJobPriority](CUPSGetJobPriority.md), [CUPS.GetJobFormat](CUPSGetJobFormat.md), [CUPS.GetJobSize](CUPSGetJobSize.md) and [CUPS.GetJobUser](CUPSGetJobUser.md).  
  
Please consider using [CUPS.GetJobsAsJSON](CUPSGetJobsAsJSON.md) in future to query job list.  
### Examples

Query all jobs:

 MBS ( "CUPS.GetJobsCount"; ""; "all"; "all"" )  
### See also

- [CUPS.GetJobCompletionTime](CUPSGetJobCompletionTime.md)
- [CUPS.GetJobCreationTime](CUPSGetJobCreationTime.md)
- [CUPS.GetJobFormat](CUPSGetJobFormat.md)
- [CUPS.GetJobPrinter](CUPSGetJobPrinter.md)
- [CUPS.GetJobPriority](CUPSGetJobPriority.md)
- [CUPS.GetJobProcessingTime](CUPSGetJobProcessingTime.md)
- [CUPS.GetJobsAsJSON](CUPSGetJobsAsJSON.md)
- [CUPS.GetJobSize](CUPSGetJobSize.md)
- [CUPS.GetJobState](CUPSGetJobState.md)
- [CUPS.GetJobTitle](CUPSGetJobTitle.md)

### Release notes

- **Version 10.5**
    - Deprecated [CUPS.GetPrinterCount](https://www.mbsplugins.eu/CUPSGetPrinterCount.shtml), [CUPS.GetPrinterDefault](https://www.mbsplugins.eu/CUPSGetPrinterDefault.shtml), [CUPS.GetPrinterName](https://www.mbsplugins.eu/CUPSGetPrinterName.shtml), [CUPS.GetJobCompletionTime](https://www.mbsplugins.eu/CUPSGetJobCompletionTime.shtml), [CUPS.GetJobCreationTime](https://www.mbsplugins.eu/CUPSGetJobCreationTime.shtml), [CUPS.GetJobFormat](https://www.mbsplugins.eu/CUPSGetJobFormat.shtml), [CUPS.GetJobID](https://www.mbsplugins.eu/CUPSGetJobID.shtml), [CUPS.GetJobIndex](https://www.mbsplugins.eu/CUPSGetJobIndex.shtml), [CUPS.GetJobPrinter](https://www.mbsplugins.eu/CUPSGetJobPrinter.shtml), [CUPS.GetJobPriority](https://www.mbsplugins.eu/CUPSGetJobPriority.shtml), [CUPS.GetJobProcessingTime](https://www.mbsplugins.eu/CUPSGetJobProcessingTime.shtml), [CUPS.GetJobSize](https://www.mbsplugins.eu/CUPSGetJobSize.shtml), [CUPS.GetJobState](https://www.mbsplugins.eu/CUPSGetJobState.shtml), [CUPS.GetJobTitle](https://www.mbsplugins.eu/CUPSGetJobTitle.shtml), [CUPS.GetJobUser](https://www.mbsplugins.eu/CUPSGetJobUser.shtml) and [CUPS.GetJobsCount](https://www.mbsplugins.eu/CUPSGetJobsCount.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin, version 10.5pr2](https://www.mbsplugins.de/archive/2020-10-05/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 6/2017, Seite 25](https://filemaker-magazin.de/neuigkeit/3967-Appetithappen-FMM_201706)

This function checks for a license.

Created 18th August 2014 , last changed 3th April 2021

  
[CUPS.GetJobsAsJSON](CUPSGetJobsAsJSON.md) - [CUPS.GetPrinterCount](CUPSGetPrinterCount.md)

[HTML Version](CUPSGetJobsCount.shtml)