You are viewing limited content. For full access, please sign in.

Question

Question

Compare Results of a Query and Search Repository

asked on September 7, 2017 Show version history

To start with some context, we have an disclosure form that all employees must complete and submit each year.  Any new employees hired during the same calendar year will not need to complete this disclosure, as they did it during their new employee orientation process.

 

I'm hoping to to compare the list of employees which can be obtained using a custom query task in Workflow, and compare it to a list of employees compiled using Workflow's search repository.  (The Search Repository task is looking for the saved disclosures, and returning the Employee's name, one of the metadata values.)

 

Is there a way to compare the results of both searches, and return a list of employees that haven't completed their annual disclosure?  The only idea I've had so far is to use each row found in the query, and search for a matching value in the Search Repository task.  I'm hoping to avoid this, as we have about 300 employees, and it would mean 300 searches.  I'm hoping to compare the results of each and minimize the number of searches.

 

If more clarification is needed, let me know.  

 

Thanks!

 

We are using Workflow version 10.2.0.216

0 0

Answer

SELECTED ANSWER
replied on September 7, 2017

I just did one of these.

Put all the search result Employee IDs into a multi-value token. Then put all the Employee IDs from the database into a multi-token.

Now in a for each value from the Repository search results, replace that same token with itself. But add a function to it called "Remove" to remove the Current Value. This will loop through and replace itself, each time removing a value found in the repository, until only the missing ID's remain.

Syntax once the function is applied, looks like this

%(EmployeesFromDatabase#@Remove(%(ForEachValue_Current Value))@#)

1 0
replied on September 11, 2017

That gave me the foundation that I needed to get this working! 

 

Thank you!

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.