A calculated value of a multiple-line field loses its line breaks - InfoPath Dev
in

InfoPath Dev

A calculated value of a multiple-line field loses its line breaks

Last post 02-09-2014 12:38 PM by Patrick Halstead. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-31-2014 11:54 PM

    A calculated value of a multiple-line field loses its line breaks

    I am pulling data from a multiple-line field of another list into a caculated value display.

    It works but the line breaks are lost.

    Is there a way to force it to retain the line breaks?

    YK

  • 02-04-2014 01:15 AM In reply to

    Re: A calculated value of a multiple-line field loses its line breaks

    Have you tried using a rich-text box or a multi-line text box?

    Mel Clemente
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 02-08-2014 10:23 AM In reply to

    Re: A calculated value of a multiple-line field loses its line breaks

    Thx. 

    The original field was a multi-line field, plain text.

    The calculated value box (in another form which imports the original field) is formatted as "Text" and I do not see a way to do define it any differently.

    Following your advice, I changed the original field to rich text.

    Now, in the other form the text I am getting is embedded in an xml expression.

    Still not there...

  • 02-09-2014 12:38 PM In reply to

    Re: A calculated value of a multiple-line field loses its line breaks

     I'm guessing it's because the multi-line list value only has a carriage return (or a line feed) whereas InfoPath requires both. I recommend using two translate functions. The inner translate will take the carriage return (CR) or linefeed (LF) and convert to a special value (say two asterisks - **). Then, the outer translate converts the asterisks to CRLF pair. To actually insert the CRLF pair, you will most likely have to add it to a secondary data source and refer to that field. Why? Well, you can't encode them in the fx dialog - at least I don't know how to do it.

    There was a post last year about converting repeating values to linebreaks (CR LF) in a multi-line text field. Please search the forum for linebreak or CR-LF and it should show up. 

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.