you can do this by retrieving the entries in the file cabinet with a suitable WHERE statement.
The steps are to find the entries, temporarily store the DOCIDs in a global variable, and then count the entries in the global variable.
However, since retrieving the entries from file cabinets is limited to 100, this only works if you want to count up to 100 (see example below)
Example: Count the documents with "Document Type" = "Invoice In" and return the number to a global variable MyCount.
Perform following steps in a workflow wihtin the Workflow Designer:
- Create a global variable of type Keyword, e.g. MyKeyword
- Create a global variable of type Integer, e.g. MyCount
- Add an Assign Data activity
- There add a new assignement
- Choose destination global variable MyKeyword
- Choose source File Cabinets
- Select the file cabinet and the field, e.g. DOCID
- Specify the WHERE clause, e.g. DOCUMENT_TYPE = 'Invoice In'
- Set the "Maximum number of returned documents" to "100"
- Add a second assignment
- Choose destination global variable MyCount
- Choose source Arithmetic Expression
- Use expression: Count(GV_MyKeYword)
For more informations on the Workflow Expressions see: https://go.docuware.com/workflow-expression-parser
If you want to count more than 100, you will need to solve this via a web service request from the workflow to any middleware, which takes the request from the workflow, does the count and returns the result to the workflow.
You can do this for example using an iPaaS platform such as make.com.
- Set up a new scenario and add "incoming webhook", where you send the request from the workflow.
- You'll get a URL which has to be registered in the DocuWare system as a web service.
- In Workflow Deisgner add a web service activity and configure the request to the the registered web service.
- Within the request you could for example also provide the values which should be searched for (HTTP Query or Body)
- Once the request is received by iPaaS platform, use the DocuWare connector to perform the search (search for documents).
- After that send a "webhook response" including the count result (total_number_of_bundles) from the DocuWare connector back to the workflow.
For more information on the DocuWare connector on Make.com see: https://www.make.com/en/help/app/docuware
Viele Grüße / With best regards,
Product Manager | DocuWare GmbH