Expand my Community achievements bar.

Microsoft Word Templates Question(s)

Avatar

Level 3

I am just getting to grips with Fusion 2.0 and one of the great additions (something we have been crying out for) is the Microsoft Word Template function. My initial questions/observations are:

  1. Line spacing seems not to have any effect here, i have even tried to use the "carriagereturn" and "newline" text functions but this still results in the string of text in one line. It would be great if this card could deal with this as currently some trial reports i have created are not as legible as i would have hoped
  2. I cant see any help around the card in the documentation, so i was after some information on how the Value Type "Condition" and "Loop or section" works?

This is a great addition to Fusion and i want to be able to get the most out of it!

Thanks

7 Replies

Avatar

Level 2

Hello Jonathan,

I hope you are well.

  1. Please try to compose a string and then add to the "Fill out a document" module. In this example I used the "Compose a string" module to create a bundle with my desired output:

0690z000008ZqugAAC.png

My document looks like this:

0690z000008Zqv0AAC.png

My module mapping looks like this:

0690z000008ZqvPAAS.png

My output includes line breaks:

0690z000008ZqvKAAS.png

2. Hopefully this summary for an "in progress" article will help.

A Condition tag enables you to wrap certain parts of a text that should be rendered conditionally. To wrap the conditional text, place it between the opening and closing tags. The name of the opening tag is prepended with a hash sign #, the name of the closing tag is prepended with a slash /

0690z000008Zqw3AAC.png

Template:

> {{#hasPhone}}Phone: {{phone}} {{/hasPhone}}

> {{#hasEmail}}Email: {{email}} {{/hasEmail}}

Created document:

> Phone: 123456

Loop or section

A Loop or section tag enables you to repeat parts of a text. Similarly to the Condition tag, to wrap the repeated text, place it between the opening and closing tags. The name of the opening tag is prepended with a hash sign #, the name of the closing tag is prepended with a slash /.

When using loops, you can choose to employ either the Fill out a document module or the Fill a document with a batch of data aggregator module.

Fill out a document

If you employ Fill out a document module, the content of the field Value has to be an array of collections, where:

  • Each collection corresponds to one data entry and contains one item entry
  • Item entry contains a collection with two items key and value
  • Item key contains the tag's name
  • item value contains the tag's value

Template:

> {{#contact}}

> {{name}}, {{phone}}

> {{/contact}}

Modules setup

0690z000008ZqwNAAS.png

Created document:

> Jan Toman, 1234

> Eduard Salo, 7899999

Avatar

Level 3

Hi Sam

Thanks for the great informative response. I have tried a few of these things (i think) but i will go through your post in detail and see if i can rectify the issue i was facing.

I will report back on here when I am in a position to do so!

Thanks again for the response.

Avatar

Level 3

Hi Sam

It may be easier if i give you a simple use case and you could offer some advise how you would achieve this.

I have a search record card that looks for all documents attached to a project, and presently i was using the Text Aggregator to turn this into a text string of documents (i did use the "New Row" as a separator but i am aware that wouldn't mean i would get a new line or carriage return). So if i want to have a {{ATTACHEDDOCUMENT}} tag in my template that would display these documents as a list where is document name was on a new line, how would i do this? I do also wonder whether there is an impact due to me creating a table to display this data in the Word document?

The same applies at present to any custom field where there is text we are pulling in - as this does not retain any carriage returns? Not sure if there would have to be a separate module that looks at the text and implements a carriage return where required based on some analysis of the content?

Thanks again

Avatar

Level 3

Hi Sam

I have tried to first steps in the instructions above, and as far as i can see replicated what you have done, however i still get no line breaks? The only difference I can see is how i acquire the template as in our case the template is downloaded from our Workfront instance each time it is used?

Avatar

Level 1

I seem to be having the exact same problem. I'm downloading an MS Word template and then filling in the values, but neither newline nor carriage return seems to get picked up. Were you able to solve this?

Avatar

Level 2

Hi Jonathon,

Can you share the mapping panel and the a screenshot of the Word document? If you prefer not in the group, you can email me.

I would hope that we can find what is behaving unexpectedly.

Avatar

Level 2

Hello Sam,

I've also tried replicating your steps but it seems that the word doc squashes any formatting that was included in the text module. Do you have any advice on how to get formatting such as newlines and carriagereturns to persist in word?