Getting line breaks in a multi-line field customized by InfoPath…

I’ve been working on a site, and one of the fields in the list is a multi-line text box that collects concatenated values from entries on other fields. The underlying core of the site is that this is a custom list that I’m customizing with InfoPath.

I had been putting the different field concatenations one after the other, separated by semicolons. But ideally, it would be nice to have each set on a separate line.

My SharePointBuddy pointed me in the direction of this post:

It didn’t seem to work for me, but there was a comment in there that talked about actually copying and pasting a line break character in the concat statement in the rule. By creating a WordPad document that has two lines of content, you can copy the end of the first line and get the invisible line break character. Then when you paste it into the concat statement, you get your line breaks in the field!

Here’s how it looks in the rule:


The line break in the concat statement isn’t a manual line break I put in there. It’s the effect of pasting in the line break character from the WordPad document. I also put some notes to that effect in a hidden section above the field so that future programmers wouldn’t “fix” the layout of that statement.

Before, here’s what my field looked like:


With the linebreak copied in there, we now have this:


MUCH better!

5 responses to “Getting line breaks in a multi-line field customized by InfoPath…

  1. Just gave this a shot in an edit history field on a form I’m working with, and it worked beautifully! Thanks Tom!

  2. On investigation, you can just use CTRL+ENTER in the xpath formula rather than copy and pasting. Brilliant!! thank you

  3. I’m currently have the same problem. I tried with CRTL+ENTER but it doesn’t work. Here’s my code:


    I don’t khow how to create a XML file that contain a line break. Is there someone who have this answer? I would like to create a XML file and join this file with the data connection in infopath. is it possible ?


  4. Brilliant! No messing around with external xml files! A simple 10 second solution! Much appreciated!

  5. Hi there mates, nice post and pleasant arguments commented here,
    I am really enjoying by these.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s