Forum Discussion
JasonJohnson
8 years agoQrew Assistant Captain
My js abilities are limited at best. I can go to a specified report using this -
"&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() &
"?a=q&qid=1"))
This would be acceptable but being able to place the button in a form or any report and return to the place that the button was used would be the favored outcome. I have attempted a few other codes but the issue is always the fact that I am making an edit and creating a new record in another table.
"&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() &
"?a=q&qid=1"))
This would be acceptable but being able to place the button in a form or any report and return to the place that the button was used would be the favored outcome. I have attempted a few other codes but the issue is always the fact that I am making an edit and creating a new record in another table.
QuickBaseCoachD
8 years agoQrew Captain
Xavier Fan posted some code on the old forum somewhere.
I have this code saved but not tested.
var text URLOne =
URLRoot() & "db/" & [_DBID_TABLE_1]
& "?act=api_editrecord&rid=" & ToText([Record ID#])
& "&_fid_7=" & "1";
var text URLTwo =
URLRoot() & "db/" & [_DBID_TABLE_1]
& "?act=api_editrecord&rid=" & ToText([Record ID#])
& "&_fid_8=" & "2";
var text URLThree = "location.reload(true);";
"javascript:" &
"$.get('" &
$URLOne &
"').then(function(){" &
"$.get('" &
$URLTwo &
"').then(function(){" &
$URLThree &
"})" &
"});"
& "void(0);
I have this code saved but not tested.
var text URLOne =
URLRoot() & "db/" & [_DBID_TABLE_1]
& "?act=api_editrecord&rid=" & ToText([Record ID#])
& "&_fid_7=" & "1";
var text URLTwo =
URLRoot() & "db/" & [_DBID_TABLE_1]
& "?act=api_editrecord&rid=" & ToText([Record ID#])
& "&_fid_8=" & "2";
var text URLThree = "location.reload(true);";
"javascript:" &
"$.get('" &
$URLOne &
"').then(function(){" &
"$.get('" &
$URLTwo &
"').then(function(){" &
$URLThree &
"})" &
"});"
& "void(0);