Forum Discussion
QuickBaseCoachD
8 years agoQrew Captain
Here I s a button which will toggle a checkbox field. You can set the Notification to trigger when the checkbox field changes.
var text NewToggle = IF(My Toggle field]=true, "0","1");
var text URL= URLRoot() & "db/" & dbid() & "?act=API_EditRecord"
& "&rid=" & [Record ID#]
& "&_fid_99=" & $NewToggle
& "&apptoken=" & "XXXX";
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);"
Replace the 99 with the field ID of a checkbox field created to trigger the Notification.
If you have disabled the need for app tokens, you don't need that last part of the URL formula variable, but it needs to end in a semi colon
var text NewToggle = IF(My Toggle field]=true, "0","1");
var text URL= URLRoot() & "db/" & dbid() & "?act=API_EditRecord"
& "&rid=" & [Record ID#]
& "&_fid_99=" & $NewToggle
& "&apptoken=" & "XXXX";
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);"
Replace the 99 with the field ID of a checkbox field created to trigger the Notification.
If you have disabled the need for app tokens, you don't need that last part of the URL formula variable, but it needs to end in a semi colon