Forum Discussion
- GauravSharma3Qrew CommanderHi Jorden,
Yes, you can.
Please have a look at the sample formula:URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#] & If([Checkbox]=true, "&_fid_101=0", "&_fid_101=1") & "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#])
Replace _fid_101 with your field Id and [Checkbox] field with your checkbox field name.
Please let me know if this works for you and need any further help.
Thanks,
Gaurav- JordanBeatty1Qrew CaptainThis did the trick, although it does redirect you into the record, I should have been more clear, I am wanting to do this from a table view
- GauravSharma3Qrew CommanderJordan,
Please have a look at the Mark Answer. He did the exact thing which you are asking. Also, that formula will work in all your scenarios whether you are triggering from the table or form it will redirect back to your original position.
Please go ahead with that.
Thanks,
Gaurav
- QuickBaseCoachDQrew CaptainNo Problem
Here is an example of a URL Formula field
var text NewCheckboxValue = IF([Status]="New","0","1");
var text URL= URLRoot() & "db/" & [_DBID_TABLE_1] & "?act=API_EditRecord"
& "&rid=" & URLEncode ([Record ID#])
& "&_fid_7=" & $New Status
& "&apptoken=" & "XXXX";
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);"
That last stuff is just boilerplate code (as long as you name your formula variable URL) which refreshes the page. - QuickBaseCoachDQrew CaptainJordan, my solution will refresh the page you were on, be it a record or a report.
- JordanBeatty1Qrew CaptainI am struggling to get this solution to work,
I am currently using
var text NewCheckboxValue = If([Priority]="New","0","1");
var text URL= URLRoot() & "db/" & [_DBID_TASK] & "?act=API_EditRecord"
& "&rid=" & URLEncode ([Record ID#])
& "&_fid_32=" & $New Priority;
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);- GauravSharma3Qrew CommanderReplace "New" with True.
- GauravSharma3Qrew CommanderUse this:
var text NewCheckboxValue = If([Priority]=True,"0","1");
var text URL= URLRoot() & "db/" & [_DBID_TASK] & "?act=API_EditRecord"
& "&rid=" & URLEncode ([Record ID#])
& "&_fid_32=" & $NewCheckboxValue;
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0); - JordanBeatty1Qrew CaptainThis did the trick, thank you guys!