Skip to main content
Question

Formula URL Line Break Not Working

  • September 17, 2019
  • 0 replies
  • 32 views

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
------------------------------
This topic has been closed for replies.

  • Registered
  • September 17, 2019
Have you tried inserting the url encoded character on your own? %0A should be the url encode of a new line character.