We are working on an Employee Offboarding process. We have a field on our start form where the user indicates reasons for termination. The field is formatted as a checkbox field so that the user can select multiple values:
When the form is submitted, the selected values are stored in the process schema with a semi-colon separating them:
As part of the process, we want to generate a .pdf document that lists the selected Termination Reasons. I have created a Word template document that has Merge Fields in it to show the reasons:
I then use a "Microsoft Word" activity in my process to create the .pdf file from the Word template document, mapping process schema fields to the Merge Fields. When I do this, the TerminationReasons appear in the merge field exactly as they are formatted in the schema data: in one long string with the semi-colons separating the different selected values:
Does anybody know of a way that I could take this string of Termination Reasons and format it so that when it is printed in the Merge Field it will put some kind of new line command between each value so that they are listed separately? I am hoping that there is some kind of "Update Process Data" command (C# code) that I could do to replace the semi-colons with a CRLF but so far, everything I have tried has not worked.
Please sign in to leave a comment.