Skip to main content
Question

Button to generate/send email to specific address with specific fields only once pushed

  • November 24, 2020
  • 0 replies
  • 81 views

I've searched and seen several responses to similar questions but nothing exactly this.  Here is what I need to know how to do:

Build a button for a form that when selected, it automatically sends an email to a specified email address, with specified fields from the form.  User doesn't have to do anything other than push the button.  It only sends if the button is pushed.  No checkboxes or date fields need to be toggled, and they don't have to finish populating the email or even hit send.  

It's not a notification, because I don't want it to send every time they change the record, and not a checkbox or field change, because I don't want the user to have to remember to go back in and uncheck anything.  

Your help is appreciated!  Thanks!
Carole

------------------------------
Carole Vandenberg
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
If you make a date / time field called [date / time to trigger email], then you can use this code for a formula URL field to make a button to update that field which will then trigger an email notificaiton set to watch for a change in that field. In the formula below my field ID was 58

var text URL = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_58=" & URLEncode(Now());


"javascript:" &
"$.get('" &
$TriggerEmailURL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);"

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------

  • Registered
  • November 25, 2020
An easier way might be to actually have a checkbox that is toggled by the button and then an email notification based on the update to the Checkbox. A button for this would be:

var text chk = "&_FID_34=";
var text tk = "token";

"<a class='Vibrant Alert' & href=" & 

    URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&apptoken=" & $tk & "&rid=" & [Record ID#] &
    $chk & "1" &
    "&rdr=" &
        
        URLEncode(URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&apptoken=" & $tk & "&rid=" & [Record ID#] &
            $chk & "0" &
            "&rdr=" &
                URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#]))​

& ">Send Email</a>"
This formula will simply Check and then immediately Un-Check the indicated checkbox field. You will simply need to update the variables at the beginning of the formula with the FID of your checkbox and the application token for your app.

------------------------------
Blake Harrison
bharrison@datablender.io
DataBlender - Quick Base Solution Provider
Atlanta GA
404.800.1702 / http://datablender.io/
------------------------------