Sometimes you get a request that someone wants to add automatically line breaks into a textfield. In this case the user wants to input any date and the all previous and in future typed in information should be listed in a textfield as history.
In order to get this working you have to insert two fields.
Any field “input” and text field “history”.
The history field has to be a normal textfield not a multiline field. This won’t work. So you have the limitation of 256 letters of course. But it should work for enough data normally.
Now you have to create a xml-file like this:
<?xml version=”1.0″ encoding=”UTF-8″?>
After that you can add this xml file as resource file via data connections.
Then you only need to create a rule on input field.
if field value changes (no conditions) the set the field history to the following function:
concat(input, crlf, history)
The CRLF is a field from the xml document (as secondary data source) and it creates a line break. Sometimes you have to your LF Value to get it working.
The important thing is that the textfield is a normal textfield. In Infopath you change the size of the textfield and in the properties you should make it multiline ready.
In the SharePoint list it also display the values of history with line breaks.
Some more infos are available here: https://blogs.msdn.microsoft.com/infopath/2005/03/04/inserting-line-breaks-into-text-using-rules/