Forum Discussion

Re: Converting from multi-line to rich text field without losing line breaks

Jonathan,

A QB if statement will escape when it hits the first True condition.  Imagine a record where both are present, this will only get the first one.

I suggest exporting all the records and writing a short PHP script to go through the entire data set and change both.

------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------

4 Replies

  • MarkShnier__You's avatar
    MarkShnier__You
    Icon for Qrew Legend rankQrew Legend
    try this logic

    var text ReplaceN =SearchAndReplace([Description of Service], "\n", "<br>")
    SearchAndReplace($ReplaceN, "\r", "<br>") 


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • JonathanHeuer's avatar
      JonathanHeuer
      Qrew Cadet
      Thanks Mark. I tried your suggestion and doesn't work. When you try saving the formula QB takes out the second escape.

      ------------------------------
      Jonathan Heuer
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Can you try this

        var text ReplaceN =SearchAndReplace([Description of Service], "\\n", "<br>")
        SearchAndReplace($ReplaceN, "\\r", "<br>") 


        ie try a double backslash

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------
  • JonathanHeuer's avatar
    JonathanHeuer
    Qrew Cadet
    Thanks for suggestion Don. No hablo PHP but perhaps I can open in some text editor and try the search/replace feature.

    ------------------------------
    Jonathan Heuer
    ------------------------------