Ampersand In Field Not Coming Through in HTML

  • 0
  • 1
  • Question
  • Updated 5 years ago
  • Answered
I have the following formula that composes and email when clicked.

"<a href=\"mailto:"& UserListToEmails([Email Recipients 4]) & "; " &[Record - Broker E-mail] &"?subject="& ToText([Location Name]) &"\">" &"Send Email to Selected"& "</a>"


The issue is with the [Location Name] field that I'm passing in the subject line. The location name is something like "Main & Main". However, when a user executes this formula, the email's subject line only says "Main" (I've tried passing it with and without ToText() with the same results". It seems to be leaving off the ampersand and anything after it. Any creative solutions would be much appreciated..
Photo of Brian

Brian

  • 0 Points

Posted 5 years ago

  • 0
  • 1
Try this


"<a href=\"mailto:"& UserListToEmails([Email Recipients 4]) & "; "


&urlencode([Record - Broker E-mail])


&"?subject="& urlencode([Location Name]) &"\">" &"Send Email to Selected"& "</a>"



you are building a URL and URLs to not play nicely with special characters, so you need to do a URLEncode( )