Forum Discussion
QuickBaseCoachD
9 years agoQrew Captain
This format will work on a record or a report.
var text URL = URLRoot() & "db/" & "?act=API_EditRecord&_fid_80=1&rid=" & [Record ID#];
"javascript:" &
"$.get('" &
$url &
"',function(){" &
"$.jGrowl('This Item has been put on PO CANCEL snooze', {life: 5000, theme: 'jGrowl-green'});" &
"});" &
"void(0);"
The 5000 means it will display the pop up for 5 seconds before it fades away on its own.
I have never tried this on a dashboard in part because the button needs to know which record to act on.
var text URL = URLRoot() & "db/" & "?act=API_EditRecord&_fid_80=1&rid=" & [Record ID#];
"javascript:" &
"$.get('" &
$url &
"',function(){" &
"$.jGrowl('This Item has been put on PO CANCEL snooze', {life: 5000, theme: 'jGrowl-green'});" &
"});" &
"void(0);"
The 5000 means it will display the pop up for 5 seconds before it fades away on its own.
I have never tried this on a dashboard in part because the button needs to know which record to act on.
QuickBaseCoachD
9 years agoQrew Captain
It took me a while to get this working as there were some recent posts from Laura Hillier and Matthew Neil which i needed to cobble together. But now i have it for myself too. There is some crazy syntax for sure.
This worked
var text Update= URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & ToText([Record ID#]) & "&_fid_188=" & ToText(Now());
var text URL =
"javascript:" &
"$.get('" &
$Update &
"',function(){" &
"$.jGrowl('This Item has been put on PO CANCEL snooze', {life: 5000, theme: 'jGrowl-green'});" &
"});" &
"void(0);";
"<a class='Vibrant Danger' href=\"" & $URL &"\"" & ">Button name goes here" & "</a>"
The choices for the button color are:
"<a class='Vibrant'>Vibrant</a>", // regular grey button :(
"<a class='Vibrant Alert'>Vibrant Alert</a>", // yellowish
"<a class='Vibrant Danger'>Vibrant Danger</a>", // red
"<a class='Vibrant Primary'>Vibrant Primary</a>", // blue
"<a class='Vibrant Snowy'>Vibrant Snowy</a>", // white
"<a class='Vibrant Success'>Vibrant Success</a>" // green
)
This worked
var text Update= URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & ToText([Record ID#]) & "&_fid_188=" & ToText(Now());
var text URL =
"javascript:" &
"$.get('" &
$Update &
"',function(){" &
"$.jGrowl('This Item has been put on PO CANCEL snooze', {life: 5000, theme: 'jGrowl-green'});" &
"});" &
"void(0);";
"<a class='Vibrant Danger' href=\"" & $URL &"\"" & ">Button name goes here" & "</a>"
The choices for the button color are:
"<a class='Vibrant'>Vibrant</a>", // regular grey button :(
"<a class='Vibrant Alert'>Vibrant Alert</a>", // yellowish
"<a class='Vibrant Danger'>Vibrant Danger</a>", // red
"<a class='Vibrant Primary'>Vibrant Primary</a>", // blue
"<a class='Vibrant Snowy'>Vibrant Snowy</a>", // white
"<a class='Vibrant Success'>Vibrant Success</a>" // green
)