Need help showing Notes in an alert box. Notes is a multiline text and alert chokes on it.

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
I'm trying to show my notes in an alert box and is not able to do so where there are more than one line in the notes field and need some help.

Formula text field with HTML =


"<a href='javascript:void(0)' onclick=\"window.alert(' " &ToText([Notes]) & " ');return false;\"> Notes</a>"

Photo of Tribs

Tribs

  • 20 Points

Posted 2 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 29,924 Points 20k badge 2x thumb
It is not obvious how do to this but thanks to the awesomeness of JavaScript it can be easily done:

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=525


Note that this formula uses backticks characters (upper left key on keyboard). I made other simplifications and formatting of your formula.