# Using Actions in Switch with the Quick Check, how to?

**URL:** <https://callas.discourse.group/t/using-actions-in-switch-with-the-quick-check-how-to/164>\
**Category:** General\
**Created:** [September 16, 2026, 8:41am UTC](https://callas.discourse.group/t/using-actions-in-switch-with-the-quick-check-how-to/164 "2026-09-16T08:41:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JanSuhr](https://yyz2.discourse-cdn.com/flex028/user_avatar/callas.discourse.group/jansuhr/32/11_2.png) [@JanSuhr](https://callas.discourse.group/u/JanSuhr)\
**Post date:** [September 16, 2026, 8:41am UTC](https://callas.discourse.group/t/using-actions-in-switch-with-the-quick-check-how-to/164/1 "2026-09-16T08:41:14Z")

</div>

I have a Switch flow where we want to find how many pages there is in a PDF. I tried to use the Actions in the flow and it can use a Quick Check. To do so it asks for a .cfg file. It has a sample.cfg but where is it.

How should the .cfg look for just do a app.doc.numPages?

Is this enough?  
_ **let numbOfPages = app.doc.numPages;** _

_ **app.vars.numberOfPages = numbOfPages;** _

Would be nice with some documentation covering this.

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/callas/original/1X/66d65ef1cd3c57b9c7e673b998009b1419207508.png)

Thanks

---

<div class="post-metadata">

**Author:** ![Rene](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@Rene](https://callas.discourse.group/u/Rene)\
**Post date:** [September 16, 2026, 11:01am UTC](https://callas.discourse.group/t/using-actions-in-switch-with-the-quick-check-how-to/164/2 "2026-09-16T11:01:52Z")

</div>

Hi Jan,

the Action lists all .cfg files from var/Reports/QuickCheck by default. And the syntax can be found here:

> **[Quick Check configuration syntax](https://help.callassoftware.com/a/1086562-quick-check-configuration-syntax)**
>
> callas Quick Check configuration is done by using one or several filter expressions. Any filter expression has a certain specificity and either includes or excludes the respective sub data structure or data field.

But the best - also to testing beforehand - would be using Desktop and the ProcessPlan step “Quick Check” where you also have a filter on the Info button “Insert Quick Check objects …”. But the content of the .cfg files for --quickcheck (or Switch action) is just the text from the “quickcheck\_config” array or here an overview:

> **["aggregated" data elements and output syntax](https://help.callassoftware.com/m/pdftoolbox/l/1566688-all-aggregated-quick-check-objects-and-output#gsc.tab=0)**
>
> The "aggregated" block contains several sub-divisions that reflect aggregated information from various areas, such as color or font resources, transparency and overprint, etc.

For your concrete question regarding number of pages:

> $.direct: false  
> $.aggregated: false  
> $.aggregated.pages.length: true

Best regards,  
René

---

<div class="post-metadata">

**Author:** ![JanSuhr](https://yyz2.discourse-cdn.com/flex028/user_avatar/callas.discourse.group/jansuhr/32/11_2.png) [@JanSuhr](https://callas.discourse.group/u/JanSuhr)\
**Post date:** [September 16, 2026, 11:24am UTC](https://callas.discourse.group/t/using-actions-in-switch-with-the-quick-check-how-to/164/3 "2026-09-16T11:24:54Z")

</div>

Thanks for the explanation.

Is there a way to also configure the content of the dataset you can send out.

This will be used in a big Switch flow and I need the JSON structure to be the same as it is from pdfToolbox processplans. In them I also output app.doc.numPages. as a named app.vars.numberOfPages

---

<div class="post-metadata">

**Author:** ![Rene](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@Rene](https://callas.discourse.group/u/Rene)\
**Post date:** [September 16, 2026, 11:54am UTC](https://callas.discourse.group/t/using-actions-in-switch-with-the-quick-check-how-to/164/4 "2026-09-16T11:54:11Z")

</div>

I am not fully sure to understand the question. But the dataset cannot be changed, it is the JSON output from the --quickcheck … But it sounds more likely you can/should use QuickCheck directly in a Process Plan which would be also easier to fill the app.vars object as your needs. Or transform the QuickCheck dataset JSON in Switch to something which can be used for --setvariable later.

---

<div class="post-metadata">

**Author:** ![JanSuhr](https://yyz2.discourse-cdn.com/flex028/user_avatar/callas.discourse.group/jansuhr/32/11_2.png) [@JanSuhr](https://callas.discourse.group/u/JanSuhr)\
**Post date:** [September 16, 2026, 12:01pm UTC](https://callas.discourse.group/t/using-actions-in-switch-with-the-quick-check-how-to/164/5 "2026-09-16T12:01:36Z")

</div>

Yes I did it with a process plan and a Quick check.  
This is the code I used:  
let numbOfPages = app.doc.numPages;

app.vars.numberOfPages = numbOfPages;

Then I get then “numbOfPages”: 1 in the vardump

Just wanted to see how the Action Quick check could be configured.

Thanks
