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: http://blogs.msdn.com/b/infopath/archive/2005/03/04/385577.aspx
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!
Just gave this a shot in an edit history field on a form I’m working with, and it worked beautifully! Thanks Tom!
On investigation, you can just use CTRL+ENTER in the xpath formula rather than copy and pasting. Brilliant!! thank you
I’m currently have the same problem. I tried with CRTL+ENTER but it doesn’t work. Here’s my code:
concat(“linebreak”,”linebreak”,field1,field2,”linebreak”,field3)
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 ?
Thanks
Brilliant! No messing around with external xml files! A simple 10 second solution! Much appreciated!
Hi there mates, nice post and pleasant arguments commented here,
I am really enjoying by these.