Line Break gone after post back - InfoPath Dev
in

InfoPath Dev

Line Break gone after post back

Last post 02-24-2013 01:10 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-20-2013 09:30 AM

    Line Break gone after post back

    Hi there,

    I have a webbrowser InfoPath form which has a button.

    I use the rule of the button to add text to a text box. I need line break at each button clicking. (I cannot use C# code since this form will work with K2.)

     In the rule, I use "concat" function as  "concat(field3,now(),"----",@crlf)".

    @crlf is from a xml file data connection.

    <?xml version="1.0" encoding="UTF-8"?>
    <characters
    cr="&#xD;"
    lf="&#xA;"
    crlf="&#xD;&#xA;"
    />

    It works until there is a web page post back.

    i.e, I clicked the button a couple of times, the text box looks good. it is like:

    2013-02-20T12:27:27-----
    2013-02-20T12:27:28-----
    2013-02-20T12:27:31-----

    Then I uploaded a file to the form, the line break is gone from the text box. it is like:

    2013-02-20T12:27:27----- 2013-02-20T12:27:28----- 2013-02-20T12:27:31-----

    After that, there is no line break if clicking button again.

    If I save it, and reopen it, there is no line break. But clicking button will add line break to new lines until another page post back.

    I tested this with a very simple form without K2. It still happens.

    How to fix this issue? 

    Thanks,

    David

     

     

    I 

     

     

     

  • 02-24-2013 01:10 PM In reply to

    Re: Line Break gone after post back

    Hi David,

    Why not just insert rows into a repeating structure? What you are doing is a bit of hackeroo.

    K2 InfoPath forms can handle code. qRules has an insert, or you could use the out-of-box default data way to add rows (but make sure K2 ignores the blank ones).

    The hackeroo is problematic because of the way in which data is stored in the XML files. You may be able to do it by properly escaping the values on concat but I'm not sure. What is the value in the @crlf?

    Sorry I can't be more helpful,

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