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

Question

Question

Workflow to use query data to index documents

asked on May 6, 2014

I am trying to create a Workflow that will query a SQL database to retrieve values and assign metadata fields. I have done this before with Real Time Lookup in QuickFields but running into a problem trying it in Workflow.

 

All the documents are in a single folder in Laserfiche. The Query data tool is configured to query the correct table. The document names are what i am using to query the table with to return the correct row. However, when I run it, it assigns the same query values to all the documents.

 

Here is what I have in the Workflow:

 

The "Find Entries" step is configured to look at the Folder ID where all the documents are stored in LF.

 

Then the "Query Data" step uses the document name to query the table in SQL where all the data is that I want to create tokens for. The query is working in that it is able to return data and assign it to metadata fields but all the documents end up getting the same exact metadata. So something is not working as I need it to.

 

I have this set up as a Business Process so I can run it from within the Client so there are no starting conditions (other than manual).

 

Any ideas as to where I made a mistake?

 

Thanks,

Eric

 

 

0 0

Answer

SELECTED ANSWER
replied on May 6, 2014

I found my problem.

 

I was using the global token %(Entry Name) when I should have been using the token from the "For Each Entry" step: %(ForEachEntry_CurrentEntry_Name).

 

As soon as I switched that token it worked as desired.

 

Thanks for the feedback anyway.

1 0

Replies

replied on May 6, 2014

It sounds like your query matches the same entry in the database for all of the documents. You may need to be more specific. Can you give us more information on your Query Data settings, document names, and database entries?

0 0
replied on May 6, 2014

Here are a couple of screenshots for more background.

 

This is how the data source and query are configured:

 

 

 

Here is how the documents are named and you can see how it is using the same metadata for the three different test documents. All three of these are different contracts with different vendors.

 

 

There is a column in the database for Doc_id which is what I have the lookup using to return the correct row. The doc_id is the same value as the "Name" of the document in LF. However, it seems that it is using whatever the first entry is and not using the "For Each Entry" to get a new doc_id and run the query.

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

Sign in to reply to this post.