cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

Workflow to Update Document - Formatting Question

Hi, I'm having trouble getting my format in a Word Document correct. the basic workflow does this

1) read a SharePoint list of users into a collection variable.

2) Read the collection variable and gather First Name, Last Name, etc

3) Build a Word Document to create a contact list in a table

We then have created a document with Plain Text Content Controls, which the "Update Document" Step is populating.

The problem we are having is that the Content Control is being populated as a single line, instead of putting each entry on a new line. Screenshot Below

We have tried the following to troubleshoot:

1) logged the string output in the Workflow History. it output shows each entry is correctly on a new line (I.E the issue is not the "Build String" step). This is how we would like to see the output in the MS Word Document.

2) in MS Word, changed to a Real Text Content Control. This yielded funny results

          I) we then got each result on a new line as required

          II) However, we then seem to get an additional line, which is all of the same results repeated on a single line of text again. I have no idea where or why this ia                happening

3) In the Plain Text Content Control Properties, we enabled the box to allow Carriage Returns.

          I) we get exactly the same behavior as the Real Text Control above

What am I doing wrong?

Thanks

Carl

Labels: (1)
0 Kudos
Reply
7 Replies
Highlighted
Automation Master
Automation Master

Re: Workflow to Update Document - Formatting Question

What does your Build String action setting look like?

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Workflow to Update Document - Formatting Question

Here you go. I've included the Query, the Collection and the Build String. The Log History shows what the final string is, however, the MS Word Document seems to contain "extra" when I use that same string.

the variable which I'm logging in the history list above is being used to update the document Control. Totally confused as to why the history output differs from the data showing in the document (screenshots in original post)

A

Thanks in Advance

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: Workflow to Update Document - Formatting Question

I think, from looking at this, that your build string is just appending your new users onto the existing variable before the Update happens, so I think your logic needs a little reworking.

So here is the order of things that are happening

Query stored in Collection

For Each

User 1 First Name etc

Build String = "User 1"

For Each

User 2 First Name etc

Build String = "User 1User2"

For Each

User 3 First Name etc

Build  String = "User 1User 2User 3"

Update Document

Does this make sense?

In the Build String, you should be able to use the {Common:NewLine} command.

Try that

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Workflow to Update Document - Formatting Question

Hi Ryan,

I also did try the "new line" command within the string. the same result is occurring

You are right - My string is building on itself. However, I have put the two commands on separate lines, and verified via the Workflow Log that it is actually putting it on separate lines. check it out

Workflow log:

this same variable is then inserted into a rich text control in MS Word. here is the result

I'm at the verge of giving up on this, I just cant understand where or why it is getting the repeated data from, especially since its not in the output to the workflow log

Thanks

Carl

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Workflow to Update Document - Formatting Question

Hi Carl,

You can try one more thing, the collection variable is having data in an array. try updating the content control directly with collection variable ( I haven't tried it , just a suggestion), if it works it should come line by line automatically.

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Workflow to Update Document - Formatting Question

Hi, thanks for the suggestion. I did try this. the array format is a flat list with each value being separated by a ;

the output of this will not be in list format

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Workflow to Update Document - Formatting Question

I also have this problems....

0 Kudos
Reply