Forum Discussion

GeorgeBramhall2's avatar
GeorgeBramhall2
Qrew Cadet
3 years ago

Buttons in Email Notifications

What kind of button or link in a Notification email should I use? I want the QB user to be able to click on a button within the email and the QB user is directed to a form in Quick Base where they can then take action. 

What does the formula look like?


------------------------------
George Bramhall
------------------------------
  • You can just insert a formula URL field into the Notification.   But won't look very fancy as a button it will look like a hyperlink.

    If you want a button appearance then the code would be like this from Kirk's Magic Buttons app.


    var text URL = (insert URL here)


    var text ButtonWords = "Insert button words here";

    // Begin button style
    var text bgcolor = "#34A853";
    var text txtcolor = "white";
    var text style = "style=\"text-decoration: none; width: 250px; text-align: center; background:" & $bgcolor & "; border-radius: 5px; padding: 8px 10px; color: " & $txtcolor & "; display: inline-block; font: normal 700 24px/1 \"Calibri\", sans-serif; text-shadow: none;";
    // End button style

    "<a " & $style & " href=" & $URL & ">" & $ButtonWords & "</a>"




    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------
    • GeorgeBramhall2's avatar
      GeorgeBramhall2
      Qrew Cadet
      OK, I put this code in to a Rich Text formula field and placed it in the body of my email notification:

      var text URL = "https://domain.quickbase.com/db/bn22h7u55?a=dr&rid=[Record ID#]&dfid=21";
      var text ButtonWords = "Go to FS Termination";
      // Begin button style
      var text bgcolor = "#34A853";
      var text txtcolor = "white";
      var text style = "style=\"text-decoration: none; width: 250px; text-align: center; background:" & $bgcolor & "; border-radius: 5px; padding: 8px 10px; color: " & $txtcolor & "; display: inline-block; font: normal 700 24px/1 \"Calibri\", sans-serif; text-shadow: none;";
      // End button style

      "<a " & $style & " href=" & $URL & ">" & $ButtonWords & "</a>"
      button appears nicely in the email....
      But when I click on it I get this result:

      https://domain.quickbase.com/db/bn22h7u55?a=dr&rid=[Record


      What is wrong with my formula?


      ------------------------------
      George Bramhall
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        https://domain.quickbase.com/db/bn22h7u55?a=dr&rid=" & [Record ID#]  & "&dfid=21";

        You have to end the quotes after specifying the record ID so that the value of the record I did get substituted into the formula and not the actual words of the field name going into the URL


        ------------------------------
        Mark Shnier (YQC)
        mark.shnier@gmail.com
        ------------------------------