Count Number of Jobs Processed Thru Flow
- 
				ezninnovation
 - Newbie
 - Posts: 14
 - Joined: Tue May 14, 2024 8:46 pm
 
Count Number of Jobs Processed Thru Flow
Any suggestions on counting the number of jobs that go thru certain parts of a flow? For instance, I am interested in counting the total number of jobs that go thru a flow, but also within that how many go to manual prepress vs flowing thru without manual intervention.  I see a few options on the AppStore. Anyone used these?
			
			
									
						
										
						- tdeschampsBluewest
 - Member
 - Posts: 153
 - Joined: Tue Jun 01, 2021 11:57 am
 
Re: Count Number of Jobs Processed Thru Flow
Hi,
There are many options for tracking job counts in Switch, and the best choice depends on why and how you want to use those statistics.
Here is a quick overview of the main approaches, listed in my personal order of preference.
1. Base Switch Function – [Switch.Counter]
This is the simplest, built-in option. It increments by one each time it is called, but it's limited to a maximumvalue. (see the doc here https://www.enfocus.com/manuals/UserGui ... group.html)
You can add a private data like in the flow, to get the value attached to the job when it comes across a folder
You can then retrieve this private data later, for example to use as a suffix.
If you need multiple counters, you can name them like this:
2. Counter Plus
App Store link
A more advanced counter stored in the Switch database (using global data).
It automatically manages the addition logic, so no manual incrementing is required.
This is a good option if you want a persistent counter that survives Switch restarts.
It can also count with alphabetical counter (A, B, ...)
3. CSV Creator
App Store link
Writes job data to a CSV file accessible by Switch.
Each new row can include columns such as job ID, format, quantity, and timestamp.
This is a straightforward way to create a spreadsheet-friendly log.
For a paid app, i think it's the best bang for your buck out there. (and i do not say that because we are the developper of it, well maybe a bit
 )
4. Elasticsearch Connect
App Store link
This is my preferred solution.
It allows you to store data objects in an Elasticsearch database (either cloud-hosted or local via Docker).
With tools like Grafana or Kibana, you can create live dashboards, charts, and shareable reports, which can be displayed in a production environment.
It is slightly more complex to install, but the documentation includes ready-to-use Docker configurations.
It's listed as a paid app, but we recently decided to put it for free, although the AppStore page may not yet reflect this yet. I'll double check today.
5. Global Data
App Store link
Similar in principle to [Switch.Counter] and Counter Plus, but designed to store more complex objects (including files) in the Switch database.
It can be used as a counter by reading the current value and writing it back with “+1”, although this is not its main purpose.
Best suited for storing and sharing structured data between flows.
6. Counter Numberer
App Store link
Performs a similar function to Counter Plus but stores the counter value in a .txt file on your server.
Useful if you prefer a simple, file-based solution.
Summary
• For basic counting, use [Switch.Counter] or Counter Plus.
• For simple reporting, use CSV Creator.
• For advanced visualization and analytics, use Elasticsearch Connect with Grafana.
• For complex data handling or custom logic, use Global Data.
			
			
									
						
							There are many options for tracking job counts in Switch, and the best choice depends on why and how you want to use those statistics.
Here is a quick overview of the main approaches, listed in my personal order of preference.
1. Base Switch Function – [Switch.Counter]
This is the simplest, built-in option. It increments by one each time it is called, but it's limited to a maximumvalue. (see the doc here https://www.enfocus.com/manuals/UserGui ... group.html)
You can add a private data like in the flow, to get the value attached to the job when it comes across a folder
Code: Select all
fileCount=[Switch.Counter]If you need multiple counters, you can name them like this:
Code: Select all
[Switch.Counter:Id="myUniqueCounterName"]2. Counter Plus
App Store link
A more advanced counter stored in the Switch database (using global data).
It automatically manages the addition logic, so no manual incrementing is required.
This is a good option if you want a persistent counter that survives Switch restarts.
It can also count with alphabetical counter (A, B, ...)
3. CSV Creator
App Store link
Writes job data to a CSV file accessible by Switch.
Each new row can include columns such as job ID, format, quantity, and timestamp.
This is a straightforward way to create a spreadsheet-friendly log.
For a paid app, i think it's the best bang for your buck out there. (and i do not say that because we are the developper of it, well maybe a bit
4. Elasticsearch Connect
App Store link
This is my preferred solution.
It allows you to store data objects in an Elasticsearch database (either cloud-hosted or local via Docker).
With tools like Grafana or Kibana, you can create live dashboards, charts, and shareable reports, which can be displayed in a production environment.
It is slightly more complex to install, but the documentation includes ready-to-use Docker configurations.
It's listed as a paid app, but we recently decided to put it for free, although the AppStore page may not yet reflect this yet. I'll double check today.
5. Global Data
App Store link
Similar in principle to [Switch.Counter] and Counter Plus, but designed to store more complex objects (including files) in the Switch database.
It can be used as a counter by reading the current value and writing it back with “+1”, although this is not its main purpose.
Best suited for storing and sharing structured data between flows.
6. Counter Numberer
App Store link
Performs a similar function to Counter Plus but stores the counter value in a .txt file on your server.
Useful if you prefer a simple, file-based solution.
Summary
• For basic counting, use [Switch.Counter] or Counter Plus.
• For simple reporting, use CSV Creator.
• For advanced visualization and analytics, use Elasticsearch Connect with Grafana.
• For complex data handling or custom logic, use Global Data.
Do you like the Enfocus Apps developed by Bluewest? 
Feel free to leave a comment on the Appstore!
			
						Feel free to leave a comment on the Appstore!
- magnussandstrom
 - Advanced member
 - Posts: 527
 - Joined: Thu Jul 30, 2020 6:34 pm
 - Location: Sweden
 - Contact:
 
Re: Count Number of Jobs Processed Thru Flow
Another suggestion (that I use for many of our flows) is using the free app Create file from template to write a csv-log. 
Here is an example flow that you could start out with: https://tinyurl.com/4k47khcc
Each job in this example adds a new line to the CSV file. The CSV file is named after the flow name along with the current year and month, creating a new log file each month. You can modify the EJS file and the app settings to include any data you want in the CSV.
			
			
									
						
										
						Here is an example flow that you could start out with: https://tinyurl.com/4k47khcc
Each job in this example adds a new line to the CSV file. The CSV file is named after the flow name along with the current year and month, creating a new log file each month. You can modify the EJS file and the app settings to include any data you want in the CSV.
- JimmyHartington
 - Advanced member
 - Posts: 492
 - Joined: Tue Mar 22, 2011 7:38 am
 
Re: Count Number of Jobs Processed Thru Flow
I use FlowSpy (https://www0.enfocus.com/en/appstore/product/flowspy) in many of my apps for logging.
It creates a csv-file and you can add Private Data to the csv as well.
			
			
									
						
										
						It creates a csv-file and you can add Private Data to the csv as well.