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

Question

Question

Parse Electronic Document in a Workflow

asked on December 6, 2013

Is there a way to parse a CSV file that is an electronic document within a workflow?

 

0 0

Replies

replied on December 6, 2013

Can you please specify what you mean by parse? What are you intending to do with the document?

0 0
replied on December 6, 2013

If you mean you have it as an electronic document in Laserfiche and you want to read its contents in Workflow, then no, there is no activity that will do that. You can do it as a script, but you will have to write the code that exports the CSV file to a folder in Windows, then opens it and extracts whatever information you need. Depending on the load you expect, Workflow might not be suitable for that operation.

 

Like Kenneth said, if you give us more details on what you are trying to accomplish, we can give you a better solution.

0 0
replied on December 6, 2013

I need to parse the CSV file so I can update a SQL table with the data, it's basic address information. I'm not sure if I have to detach the file before it can be parsed or if I can parse it while it's still attached as an electronic document.

0 0
replied on December 6, 2013 Show version history

The script involved is fun to make. I have done this for some of our clients. 

 

Once you have your script, do remember that ODBC connections only allow 1 application/session to access it at a time.

 

Good Luck

0 0
replied on December 8, 2013 Show version history

Actually, there is a way to do this in Workflow... Not recommending it, just saying:

 

  1. First of all, you don't need to import the CSV into Laserfiche first but if you do, when importing the text document into Laserfiche, disable "File Conversion." In the GUI, Tools->Options->New Documents->File Conversion and make sure the extension isn't there or else remove it.
  2. In Workflow, use a toolkit script and do something like this:
     
    'option: If the CSV hasn't been imported into Laserfiche, insert code to open it from disk (no need to import it)
     
    'option: If the CSV has been imported into Laserfiche, Insert code to see if the text extraction has been performed, if not do it.
     
    'insert code to read the text into a variable/memory
     
    'option: Insert a code block to loop through the lines of text
     
    'insert code to use RegEx to extract the information. I'm assuming comma delimited values
    
     
0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.