Forum Discussion
ELANAMETH
6 years agoQrew Cadet
Thank you so much!, but I am trying to incorporate something like this:
if (confirm("Are you sure you want to mark complete?")) {
//(if yes) execute the api (which is sitting in a variable)
} else {
// alert that record was not saved
}
Here is part of my code with the following variables (it's all in a URL formula):
$popup: "javascript:confirm('...')
$url: the API that is editing the current record
$Cancel: "javascript:alert('....')
"javascript:" &
"$.get('" & $popup &
"',function() {" &
"if ($popup == true) {" &
& $url &
"} else {"
& $Cancel &
"});" &
"void(0);"
if (confirm("Are you sure you want to mark complete?")) {
//(if yes) execute the api (which is sitting in a variable)
} else {
// alert that record was not saved
}
Here is part of my code with the following variables (it's all in a URL formula):
$popup: "javascript:confirm('...')
$url: the API that is editing the current record
$Cancel: "javascript:alert('....')
"javascript:" &
"$.get('" & $popup &
"',function() {" &
"if ($popup == true) {" &
& $url &
"} else {"
& $Cancel &
"});" &
"void(0);"
AustinK
6 years agoQrew Commander
First thing I noticed is you had 2 ampersands before $url. I will let you know if I see anything else.