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

Question

Question

Using workflow to extract data from external table to word/pdf

asked on August 8, 2019 Show version history

We have an external table for employee info such as name, title, badge #, radio #,  email and etc....  When changes are need/made we use a LF Form and the "Update" tool in workflow to change info.  We also use the info as lookups for other LF forms.  It all works great!    

 

So now I want to have workflow query the table (on a weekly schedule) and return all employees values on a word doc table by row.  Plan on having workflow email staff when any change is made to the roster.  Just not sure how to query the information to use in a table merge in word.  

 

Couple of the screenshots from our New/Update workflow to show connections.  

 

Thanks in advance for any suggestions.  John

 

Capture.PNG
Capture.PNG (20.52 KB)
0 0

Answer

SELECTED ANSWER
replied on August 8, 2019

Hi John, 

This sounds like a great use case for a workflow. If you want to grab all of the values, you can use the Query Data activity, which is very similar to the Update Data you're familiar with. If you don't put any query criteria, it'll bring back all the rows in your table. You can confirm this by clicking "Test Query..." below the query criteria.

The Query Data activity returns the information in a format that's simple to use with a Table Merge in the Update Word Document activity. If your document already has a table set up, you can map in the values by selecting the results from your Query Data activity as the "Source Data File" when choosing Table Field Merge. Then, you'll be able to click into the "Value" column on the screen and choose from a drop-down of the columns in your table to map things in. In this screenshot, my table is named "MyTable" and I've used the "Import field names from document..." button to grab the merge fields from my Word document. 

After that, you'll just need to send it out via email as a file attachment. There's a pretty thorough whitepaper on using Workflow to update word documents, which you can find here for additional details! (Check out page 11 for table field merge specifically.)

0 0
replied on August 8, 2019

Very easy and worked great!  Thanks Anita!

0 0
replied on August 12, 2019 Show version history

Anita is there anyway to sort the results of the Query?  Like by Rank and also Date of Rank?  I'm guessing it involves a custom Query but have no clue were to start?  Thanks John

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.