Notifications
Clear all

Adding a newline  

   RSS

0

I am trying to concatenate several lines together with a newline into one field, which will be displayed using a textarea component.

I have tried using "\n", "\r\n", "\\n", "\\u000D\\u000A", and "\\u000A", but the textarea component just displays exactly what I have entered, instead of a newline.

{% for text in TEXTS %}
{% for line in TEXT_LINES %}
{% dictionary_add_key_value text "TEXTAREA" text.TEXT|concatenate:line.TDLINE|concatenate:"\n" %}
{% endfor %}
{% endfor %}
This topic was modified 8 months ago by
1 Answer
0

Try add_newline:

{% for text in TEXTS %}
{% for line in TEXT_LINES %}
{% dictionary_add_key_value text "TEXTAREA" text.TEXT|concatenate:line.TDLINE|add_newline %}
{% endfor %}
{% endfor %}


Full documentation is here: https://clearsoftware.com/documentation/clearprocess/apis/functions/#add_newline
This post was modified 8 months ago by Jon Gilman

Thanks, that worked!

Share: