Confirm Popup and if "OK"" execute API
I am looking to create a Pop-Up that requests a confirmation before an action is taken.
I created a button that toggles a box to initiate a notification send out to our Candidates (code below). This works great.
var number newToggleValue = If([test_box]=true,0,1);
var text urlOne = URLRoot() & "db/" & Dbid()
& "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_28=" & $newToggleValue
& "&apptoken=XXXXXXX";
var text urlTwo = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#];
$urlOne
& "&rdr=" & URLEncode($URLTWO)
_____________________________
But I would like to have the button request confirmation that the user wanted to press the button. So we don't send out emails accidentally.
Something like:
If button is pressed, display "Are you sure you want to send notification?" with options "Send" and "Cancel".
If Send, $urlOne & "&rdr=" & URLEncode($URLTWO)
If Cancel, do nothing and close popup.
All resources I have found on this discuss using Javascript in a URL Formula Field back in 2019, and I know QuickBase does not take Javascript atm, whether it did in the past I do not know. Any thoughts on how to accomplish this now?
------------------------------
Devin Jackson
Director of Operations
MedMatch
------------------------------