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
Hi Jack Ferguson, can you shed some light on how are you trying to accomplish what you describe above? Assuming you are using the Word Doc From Template smart service, did you try to add a carriage return where do you want the new lines to be added by adding a char(10)?
char(10) carriage returns won't render as anything in a Word document, unfortunately. What Jack will need to do is inject the wordML newline character in between lines. It's pretty easy to do, after the hurdle of figuring out the syntax.
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!
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.