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

Question

Question

Word activity is producing XML

asked on May 8, 2020

Hi All

I need to populate a table in Word document from a data source.  

Workflow I am using is shown below

 

Workflow runs without error, however the resulted file is not a table populated with data from query result as expected (23 records should be shown).  Instead the following report is saved in the repository

Any idea what's causing this and any suggestion on how to fix it.

Thanks

  

 

 

0 0

Answer

SELECTED ANSWER
replied on May 12, 2020

Hi Naveed,

Upon further inspection it looks like you have an extra space in the name of your TableStart/TableEnd fields. Because of this, the region name you placed in the Update Word Activity technically does not match the merge field name.

I'd recommend removing the excess space in the merge field, entering the format like the example I provided earlier: <<TableStart:VendorList>><<ProductService>> . You could also just insert a space before your column name in the Merge Region Name field in the activity.

1 0

Replies

replied on May 8, 2020

Hi Naveed,

What happens if you email yourself the resulting document instead of attaching it to an entry? Are you getting the expected file?

0 0
replied on May 8, 2020

Hi Jim

Currently, I can't test using the email because of some setup at work. 

Thanks 

0 0
replied on May 8, 2020

What is Attach Electronic Document set to use?

0 0
replied on May 8, 2020

Word document

 

0 0
replied on May 11, 2020

I am using Result File from "Update Word Document" activity

0 0
replied on May 8, 2020 Show version history

Hi Naveed, it looks like you'll want to insert a Download Electronic Document activity after obtaining the search result in your first activity, and update the resulting file in the Update Word Document activity.

 

Edited to add: separately from the XML output, you may want to check that your TableStart and TableEnd fields are also merge fields so it can identify the merge region.

0 0
replied on May 8, 2020

Hi Anita,

I used the tried the following Word tables but getting the same result. Any suggestion.  Thanks.

0 0
replied on May 11, 2020

Hi Naveed, could you post a picture of your updated process flow so I can take a look at the settings you have for your inserted Download Electronic Document activity?

0 0
replied on May 11, 2020

Hi Anita,

I  am not using Download Electronic Document Activity.  I am using "Search Repository" Activity to get the document and then use this document as a template in "Update Word Document" Activity". 

 

0 0
replied on May 11, 2020

Hi Naveed, I understand your process flow. In order to get the document to not be an XML, you will need to insert the Download Electronic Document activity into your workflow after your Search Repository activity, then point the Update Word Document activity to the downloaded file.

0 0
replied on May 11, 2020

What Anita is saying is that you likely set Update Word to use the results set from Search Repository. That is actually the list of results (which is the XML you're looking at) not the Word document that was returned by the search. Search Results are meant to be used with For Each Entry, so if you want the actual electronic document for the search hit, you will have to use Download Electronic Document to get it.

1 0
replied on May 11, 2020 Show version history

Hi Anita & Miruna,

Thank Anita for pointing to "Download Electronic Document" activity and thanks Miruna for further clarification.  

I am able to get the word document in pdf now however, the table in the document is not filled as expected. The query that result returns 23 records. The table is showing only one record with only two fields populated.  

Also, I do not want to show Table Start and Table End columns

Administrator edit: screenshot removed because it contained customer data.

Any suggestion on how to accomplish that.  Thanks for your help

 

0 0
replied on May 11, 2020

TableStart and TableEnd need to be merge fields like the rest of your fields. They seem to be static text in your screenshots.

0 0
replied on May 11, 2020

If you don't want a separate column for your TableStart and TableEnd, you can also insert those merge fields into the first column you actually want to populate. It should look somewhat like <<TableStart:VendorList>><<ProductService>> within that Product/Service column, as an example. 

0 0
replied on May 11, 2020 Show version history

Hi

I made the suggested changes and still not getting the table populated. 

Pdf saved in repository

  Any suggestion.  Thanks for your help

Word Template as selected in "Search Repository" activity

Word Activity Setting

Tokens show that there are 34 records returned from the query

Administrator edit: screenshot removed because it contained customer data.

 

0 0
replied on May 11, 2020

What file are you updating in your Update Word Document activity? Is your Update Word Activity using the file that's downloaded as the Source in the Document to Modify section?

0 0
replied on May 11, 2020

I am using Result File from "Download Electronic Document" activity

0 0
replied on May 11, 2020 Show version history

Could you also double check that since you replaced your document, your Search Repository activity still returns the correct file?

0 0
replied on May 11, 2020

Hi Anita,

I have checked, Search Repository Activity is returning correct file.

Thanks

0 0
SELECTED ANSWER
replied on May 12, 2020

Hi Naveed,

Upon further inspection it looks like you have an extra space in the name of your TableStart/TableEnd fields. Because of this, the region name you placed in the Update Word Activity technically does not match the merge field name.

I'd recommend removing the excess space in the merge field, entering the format like the example I provided earlier: <<TableStart:VendorList>><<ProductService>> . You could also just insert a space before your column name in the Merge Region Name field in the activity.

1 0
replied on May 12, 2020

Hi Anita,

Good catch.

The table in the word template is now populated with data from the query.

Thanks for your help 

0 0
replied on May 12, 2020

Glad to hear it's working!

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

Sign in to reply to this post.