Forum Discussion

JasonBowen's avatar
JasonBowen
Qrew Trainee
5 years ago

Formula URL Line Break Not Working

Good afternoon,

Below is an excerpt of the code causing trouble:

var text URL = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
& "&apptoken=xxxxxxxxxxxxxxxxxxx" 
& "&_fid_11=" & URLEncode("Submitted to Department Head") 
& "&_fid_20=" & Today() & "&_fid_48=" & [PR Log] 
& URLEncode("\n") & ToFormattedText(Today(), "mm/dd/yyyy")
& ": " &  UserToName(User()) 
& URLEncode(" submitted PR to Department Head.");​


The intent of this code is to append text to a log field, describing actions taken on a record. Such as that the multi-line text field record log field might look like this after several rounds of different users taking action on a record.

09/01/19: John Doe submitted PR to Department Head.
09/02/19: Tom Brown rejected PR.
09/02/19: John Doe submitted PR to Department Head.
09/03/19: Tom Brown approved PR.
09/04/19: Jim Johnson approved PR.

The SPECIFIC problem is the URLEncode'd line break (line 5). If I remove that portion, the button works as intended. When the line break is in place, the button does nothing on the form.

The field is a Text Multi-Line field.

Am I doing something wrong?

Thanks,

Jason​

------------------------------
Jason Bowen
------------------------------

4 Replies

  • AustinK's avatar
    AustinK
    Qrew Commander
    Have you tried inserting the url encoded character on your own? %0A should be the url encode of a new line character.
    • AydenBowen's avatar
      AydenBowen
      Qrew Member
      Hello,

      Yes, I've also attempted using the encoded character, %0A, but with same result.

      ------------------------------
      Ayden Bowen
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew Champion
        Can you try this?  double \\

        & URLEncode("\\n")

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        markshnier2@gmail.com
        ------------------------------