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

Question

Question

How can you import field data from a CSV File using workflow

asked on March 2, 2015

I have an odbc connection already created to the csv file that i need to pull the indexing from. The CSV contains the file path, category ,and name. I moved the Query Data module into the workflow. I am just struggling with how to assign the indexing data to the correct documents.

0 0

Answer

SELECTED ANSWER
replied on March 4, 2015

That was why I asked how are you going to match them. You said that would be by entry name. So workflow would read each row from the CSV file, find the entry with the correct name and set fields on the entry it found. So your query data shouldn't have a criterion for the Name since there is no starting entry.

You could do it the other way around and start it when an entry is created, look up the corresponding value in the CSV file and set the fields. But that's likely to give you worse performance since you'd potentially be making multiple concurrent connections to the CSV file.

0 0

Replies

replied on March 2, 2015

How do you match the documents to the values in each row?

1 0
replied on March 2, 2015

by name. The documents in Laserfiche are named with the name field in the csv

0 0
replied on March 2, 2015

Ok, so then you'd want to run a For Each Row activity on the results of the query, then inside that find the document (either with Search Repository or Find Entry) and set the fields.

0 0
replied on March 2, 2015

I have done that. It just sits at query data the whole time. I have attached what i have set up.

workflow for importing.JPG
0 0
replied on March 2, 2015

Do you have your CSV file picked in the dropdown?  What does the config of the query data look like?

0 0
replied on March 2, 2015

Yes, attached are the images on how they are setup

0 0
replied on March 2, 2015

Does the workflow service user have access to that file? How big is the file?

Once you get past the Query Data issue, your workflow will not do what you expect because of the use of Find Entries. If you expect to find multiple entries for each row in the CSV file, you'll have to iterate through them with For Each Entry. If a single document is expected, then you'll want to use Find Entry.

 

0 0
replied on March 4, 2015

Thank you. That makes sense, but still not following how workflow would know what documents to apply the data too. I don't see a module to suggest a "match code" or something of that sort. These documents are already in the LF but are not indexed yet. 

0 0
SELECTED ANSWER
replied on March 4, 2015

That was why I asked how are you going to match them. You said that would be by entry name. So workflow would read each row from the CSV file, find the entry with the correct name and set fields on the entry it found. So your query data shouldn't have a criterion for the Name since there is no starting entry.

You could do it the other way around and start it when an entry is created, look up the corresponding value in the CSV file and set the fields. But that's likely to give you worse performance since you'd potentially be making multiple concurrent connections to the CSV file.

0 0
replied on March 2, 2015

Just need to simply pick your CSV file from the table dropdown after you configure the activity and tie the document name column to the Entry Name value.

You are not allowed to follow up in this post.

Sign in to reply to this post.