Forum Discussion
QuickBaseCoachD
8 years agoQrew Captain
It is really difficult to have a button to both save and edit a record during the save.
It is really easy to make a button in View mode to check a box.
Here is an example of a formula URL button to be shown in View mode to check a checkbox and refresh the record.
var text URL = URLRoot() & "db/" & dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
& "&apptoken=xxxxxxxxxxxxxx"
& "&_fid_999=1;
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);"
The funky looking javascript stuff just executes the URL code and refreshes the page
Replace the 999 with the field ID of the field to be checked.
If you have the need for Application Tokens enabled in your Applications setting for Advanced Settings then you will need to supply an Application Token, or else you can disable that extra layer of security and then you would not need that line of code.
It is really easy to make a button in View mode to check a box.
Here is an example of a formula URL button to be shown in View mode to check a checkbox and refresh the record.
var text URL = URLRoot() & "db/" & dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
& "&apptoken=xxxxxxxxxxxxxx"
& "&_fid_999=1;
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);"
The funky looking javascript stuff just executes the URL code and refreshes the page
Replace the 999 with the field ID of the field to be checked.
If you have the need for Application Tokens enabled in your Applications setting for Advanced Settings then you will need to supply an Application Token, or else you can disable that extra layer of security and then you would not need that line of code.
- ArchiveUser8 years agoQrew CaptainGetting this error:
Formula syntax error
A variable declaration must end with a semi-colon. - QuickBaseCoachD8 years agoQrew Captain& "&_fid_999=1";
That line needed a closing - ArchiveUser8 years agoQrew CaptainYou are an absolute savior. Thank you so much!