Line Break while creating Text File from Template

Hi Team,

I have a multi text process variable with multiple string values, when i write the content to a text file using "Text Doc from Template" smart services, while passing the content to template i have used substitute method to replace ";" string with a line break char(10) to create a line break, but it is not reflecting in the file which i have created, where as in expression rule the line breaks are working perfectly. Please help me to resolve this issue.

  Discussion posts and replies are publicly visible

Parents Reply
  • +2
    Certified Lead Developer
    in reply to Sunil Mohan

    if pv!fileContent is an array, then calling concat() on it will not result in ";" characters to find and replace; when viewing the value of an array elsewhere the ";" character is only added on the rendering side to help human readers, but is not actually contained in the array.  For instance, concat({"a", "b", "c"}) will output abc instead of a; b; c.

    Try this instead: joinArray(pv!fileContent, char(13)&char(10))

    Also, if it still doesn't render in VI as you might expect, can you try to open the resulting file in a modern/good text editor (i.e. notepad++, etc) and report what you find there?

    Note: if this works, then you may not have needed the char(13) at all, the issue may have just been the concat.  So you could go back and try it again without the char(13) if the above works.

Children