Merge HTML Text

Merge HTML Text

Comments

  • Hi, A quick question on Merge HTML Text.

    I have a string in the flow which has built-in newline characters like this:

    line 1: asdf
    Date: 2020-01-24
    Id of Id: asdf
    Type: asdf
    Other Id: ID123
    Other Type: asdf
    Int: 1
    Some Letter: P

    I’m putting the entire string variable into the Merge HTML Text Editor. When it is printed on the view, it shows them as a single line without line-breaks.

    What am I missing to see the newlines?

  • There are least two ways to accomplish this. Both methods make use of a Split String by New Line step, a ForEach step, and either a Create Data step or a Custom Merge (NVelocity) step. Both methods involve splitting the input string into an array, iterating through that array, and merging each line into a new string. Here are two demo flows showing how to arrange this.

    In Vertical Comment Example2, there is an HTML Merge within the loop that appends the new line to the string output.
    [img]att2[/img]

    In Vertical Comment Example 3, the merge is done with a Custom Merge (NVelocity) step with an HTML break tag between the tokens.
    [img]att3[/img]
    [i]edited by james.hartzell@decisions.com on 2/10/2020[/i]

Sign In or Register to comment.