Forum Discussion
QuickBaseCoachD
8 years agoQrew Captain
So you cannot actually populate a checkbox field when opening the record to edit.
The only option would be to actually have that checkbox set to checked under the covers and then display the record in Edit mode.
The subtle difference is that when the user clicks the button, that checkbox will be checked, regardless if they choose to back out of the edit process and not actually save the record.
The code would be in two steps like this, using formula variables for each step.
var Checkbox= URLRoot() & "db/" & dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
& "&apptoken=xxxxxxx"
& "&_fid_155=1;
var Edit = URLRoot() & "db/" & Dbid() & "?a=er&key="&[Record ID#]&"&dfid=11";
$Checkbox
& "&rdr=" & URlEncode($Edit)
If you have application tokens set to be required you will need to supply that line
& "&apptoken=xxxxxxx"
or else disable them on the Settings in App properties and then you don't need that line.
The only option would be to actually have that checkbox set to checked under the covers and then display the record in Edit mode.
The subtle difference is that when the user clicks the button, that checkbox will be checked, regardless if they choose to back out of the edit process and not actually save the record.
The code would be in two steps like this, using formula variables for each step.
var Checkbox= URLRoot() & "db/" & dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
& "&apptoken=xxxxxxx"
& "&_fid_155=1;
var Edit = URLRoot() & "db/" & Dbid() & "?a=er&key="&[Record ID#]&"&dfid=11";
$Checkbox
& "&rdr=" & URlEncode($Edit)
If you have application tokens set to be required you will need to supply that line
& "&apptoken=xxxxxxx"
or else disable them on the Settings in App properties and then you don't need that line.
QuickBaseCoachD
8 years agoQrew Captain
Re: "Curiously QuickBase does allow you to do this for new records:"
It must be because there is an API for API_GenAddRecordForm (which must be what happens when the short form of a=nwr is used), but there is no API for "API_EditRecordForm" - ie that does not exist as an API.
It must be because there is an API for API_GenAddRecordForm (which must be what happens when the short form of a=nwr is used), but there is no API for "API_EditRecordForm" - ie that does not exist as an API.