cancel
Showing results for 
Search instead for 
Did you mean: 

Searching for documents with multiple values of the same keyword

James_Hansell
Confirmed Champ
Confirmed Champ

If %Kxxxx.2 means the second value for keyword %Kxxxx on a document, how can this be used to identify documents with more than one value for that keyword? Can it be incorporated into a Custom Query, or would all documents have to be routed through Workflow?

1 REPLY 1

Paul_Lloyd
Employee
Employee

You can certainly do this using workflow. I'd planned to show some screenshots to illustrate an example, but unfortunately I can't upload images at the moment. So I'll try to describe the example without the pictures.

You first need to copy the Keywords of the desired Type to a workflow Property. Use the Set Property Value Action and select the Keyword Type as the Property Value. In my example, the Keyword Type is Reason, and my property is named propReasons.

** IMPORTANT ** you must check the Set property to all value instances checkbox: this will ensure that the propReasons property is an array.

Next, use a Set Property to Expression action to get the Array size for propReasons.

In my example, I use a property named propCount to hold the value, and my expression is:

Count(%VpropReasons)

This will copy the size of propReasons (and hence the number of Keywords) to propCount.

Then I can use a Check Property Value Rule to see if propCount is greater than 1.  I use Operator Type "> "with Constant Value of 1. In my example I have Display Message Box Actions on the On True and On False branches of the Rule. The On True displays "Multiple Keyword Values".