Discussions

 View Only
  • 1.  Buttons in Email Notifications

    Posted 12-16-2021 12:03
    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
    ------------------------------


  • 2.  RE: Buttons in Email Notifications

    Posted 12-16-2021 20:39
    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
    ------------------------------



  • 3.  RE: Buttons in Email Notifications

    Posted 12-17-2021 10:38
    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
    ------------------------------



  • 4.  RE: Buttons in Email Notifications

    Posted 12-17-2021 10:44
    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
    ------------------------------