How to specify a new line in an expression rule for a Word report?

Certified Associate Developer

I am trying to print the results of an editable grid in a word report. The grid has three columns and a variable number of rows, and all of the data collected by the grid is stored in a single rule input as a text array. I'd like to be able to put each line of the grid on a new line in Word however I can't find anything in Appian that would allow me to do that (besides making a new rule input for each line which would be a lot of rule inputs). When I run the process the Word document shows:

ex,ex,ex; ex,ex,ex

Does anyone have any ideas how I could accomplish this?

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Associate Developer
    in reply to Mike Schmitt

    Mike,

    If I add that wordML character into an expression rule will Word still read it correctly?

    Edit: I gave it a try and it works (once I remove the semicolons). Thanks!

  • 0
    Certified Lead Developer
    in reply to Jack Ferguson

    For any newline character you want to inject, you'll need to construct the wordML needed to first break out of the current plaintext (i forget off the top of my head, but it starts with something like "</w:t>", followed by the linebreak i.e. "<w:br/>", followed by a new text command i.e. "<w:t>".  At the moment I can't find my saved rules that contained this stuff, but if you search back through old posts of mine you might be able to find an old export package I'd shared for "multi-column grid in Word", which includes various tools including this one.

    Either way, I suggest you define the linebreak operator in its own expression rule, for future-proofing.