Publié Fri, 01 Jun 2018 09:17:26 GMT par Denholm Kirkham Document Solutions Specialist


We have a customer where they need a total count of how many entries they have added into a one Keyword field to go into a another numeric field for a valadation later down the Workflow. Is there an easy way to add this as an assign data step in the Workflow or using a arithmetic expression to input this figure into a numeric field?

Any help would be appreciated.


Publié Mon, 04 Jun 2018 21:36:49 GMT par Bruno Villa Real Document Solution

You can the code below:

Ubound(Split(KeywordAsString(DW_KEYWORDFIELD), " ")) +1

but it counts up to a maximum of 100 entries.

Publié Tue, 05 Jun 2018 07:08:45 GMT par Denholm Kirkham Document Solutions Specialist

Hi Bruno,

Thank you for your reply. As on the cloud you cannot access the exernal database connection to the Keyword databse in the Workflow, do you know the SQL query we can insert into the Autoindex job?

Denholm Kirkham

Publié Tue, 05 Jun 2018 09:43:37 GMT par Bruno Villa Real Document Solution

Hi Denholm,

I do not know what your goal is, but if you have to count in sql you can use count(field).

If you need to get data from keyword field via workflow manager you have to write a subquery in your where clause.

I cannot provide you an example because i don't know exactly exactly you need.

Below a screenshot of my data assignment from file cabinet where i get data from a field joining with keyword_field table

Hope it helps

Publié Thu, 07 Jun 2018 13:07:39 GMT par Denholm Kirkham Document Solutions Specialist

Hi Bruno,

Many thanks for your help with this. I used the string you supplied in assign data and all worked.

Thank you very much for your help!


Publié Wed, 16 Jan 2019 21:12:55 GMT par Jon Weston File IT Solutions Sr Application Developer and RIM specialist

Hi Bruno, the code you supplied above works well unless there are spaces in the data that's in the keyword field.  eg. If the text "Jon Weston" is in one of the keyword entries then it counts that as two.  Is there a workaround for this?

The setup I have is that there's a workflow task that collects data in a keyword form field.  When the user clicks "Confirm" it dumps this keyword data into a keyword global variable.  I just want to count the entries in that keyword global variable, and also be able to iterate through them in a workflow.

Publié Thu, 17 Jan 2019 01:40:55 GMT par Josef Zayats

Have not seen this thread till today. Here is a sample AIX job - also works in the cloud to accomplish the task. (Sample FC, Document Pool, keyword name = catchword is used as an example)

Make sure you create a numeric indexfield (let's say named 'NumberofKeywords'). Create a scheduled AIX job on sample FC, with the MAtchData tab configured as follows:use extermnal database, use GUID_autoindex dataabse connection - following SQL statement :

"select dwdocid, count(*) as NumberofEntries from document_catchword group by dwdocid"

MatchCode: docID=DWDOCID.

On Assign Data tab select 

Field NumberofKeywords=Field, NumberOfEntries

Schedule the job to run as often as you need.

If you have AutoIndex module and on-premise system, same method can be used, just use Content database connection for external database





You must be signed in to post in this forum.