Skip to main content
Question

How do you create an approval button within Email Notifications?

  • April 24, 2018
  • 0 replies
  • 166 views

I setup the following in a formula URL field:

URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=<App Token>&_fid_224=Approved&rid=" & [Record ID#]

When it runs it gives me a link.
My users are asking for a html button.
Is this possible?

The other issue is that when submitting this link the system responds with a XML response.
I'd really like to give them a human readable text response.
Any ideas on this?
This topic has been closed for replies.

This syntax will probably work

var bool NewToggle = not [Completed?];

var text Update = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_6=" & $NewToggle;

var text Words = [Account Name];

var text URL =
"javascript:" &
"$.get('" &
$Update &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);";

"

  • Author
  • Registered
  • April 24, 2018

Thank you for the quick response.
I believe your answer assumes a level of understanding that I do not have.
I assume you are answering the part of my question to do with the XML response.
I'm not quite sure what to do with the code you sent.
You are referencing a fid of 6 (a boolean) which I assume I must modify to fit what I have in my table.
I can create a new field type boolean if needed.

Here's what I have:

Table: Projects

Field 224: Project Approval
Type: text

Field 225: Project Approval Button
Type: Formula - URL
Formula: URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=<App Token>&_fid_224=Approved&rid=" & [Record ID#]

Notification: Project Completion Approval
Condition: Sent wherever field "Status" changes to "Completed"
Type: Custom Message
Custom Message:

Hello User,<br>
Please approve the project [Project Name] using the below approval link.<br><br>

[Project Approval Button]
<br><br>
Thank you for your attention,<br><br>
MEDA QuickBase Administration


I have 2 issues.

1. Email is sent with a link (it works in that it updates the Project Approval with "Approved").
   Need to modify to send with a button as requested from the users.

2. Once the link is submitted a browser session is started with a XML response.
   Need to provide a human readable response. These are business users and would not understand XML.

Please let me know if any further information is needed.

Thanks.
 


Try making a formula URL field and puttng it in your email notification.

var text URLONE = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=<App Token>&_fid_224=Approved&rid=" & [Record ID#];

var text URLTWO = urlroot() & "db/" & dbid() & "?a=dr&rid=" & [Record ID#];

$URLONE
& "&rdr=" & URLEncode($URLTWO)

JimHarrison
Forum|alt.badge.img+18
  • Registered
  • April 25, 2018

Use the information below to put a link into a Notification email.

This works on a PC or Mobile device. It also works if a user is logged in or not.


The link is Used to respond to a Notification by changing a status, checking a checkbox, or other interactions that require a response. The example below clicks a checkbox.

 

The link goes into a text field on the table:

var text URLONE = URLRoot()& "db/" & Dbid()& "?act=API_EditRecord&rid="& [Record ID#]& "&_fid_<field ID>=1"& "&apptoken=<apptoken>"& "&usertoken=<usertoken>";

var text URLTWO = URLRoot();

$URLONE& "&rdr="& URLEncode($URLTWO)

 

Then the field is added to a custom email Notification:

<a href="[Click to Approve]">Click to Approve</a>

 

Improvements:

Once the User clicks the link, the browser opens and takes the user to the QB login page. We would like to remove this unnecessary step. QB requires the User login to the App and load the page.

To make the link into a button you must use the img tag. https://www.w3schools.com/css/css3_buttons.asp Use this tutorial to learn how to do this.

Your button image can be one of the images stored here: https://login.quickbase.com/db/bcgnn27bx?a=q&qid=1000039

  • Author
  • Registered
  • April 25, 2018
So then how do you get the notification to turn the {<a href="[Click to Approve]">Click to Approve</a>} into a button?

  • Registered
  • April 25, 2018
In the Exchange, you can get Kirk Trachy's 'ABC Customer Approval Tracker", and you can watch his how-to video https://www.youtube.com/embed/zfKkktE0dzM

  • Author
  • Registered
  • April 26, 2018

That really helped.

It gives me the code I needed for the button I was looking for.

Thanks so much!


  • Registered
  • August 14, 2018
100% Agreed Lawrence, it is working for me as well.  I am just stuck on the login page now, and need to figure out how to redirect to the exact table, as the user is an existing Quickbase User.