EricEric3
9 years agoQrew Trainee
Page Refresh Challenge and Symptom
I have a two have formula field buttons with different yet similar functionality.
The first one:
var text ValueUpdate = URLRoot() &"db/" & [_DBID_WIDGETS] & "?act=API_EditRecord&rid=" & [Clone Record ID#] & "&_fid_54=" & "False" & "&apptoken=######";
var text RefreshRecord=URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Clone Record ID#] & "&apptoken=######";
$Clone & "&rdr=" & URLEncode($ValueUpdate) & URLEncode("&rdr=" & URLEncode($RefreshRecord))
The second one:
var text Processed = URLRoot() &"db/" & [_DBID_WIDGETS] & "?act=API_EditRecord&rid=" & [Record ID#] & "&_fid_60=" & "True" & "&apptoken=######";
var text RefreshRecord=URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#] & "&apptoken=######";
$AzureAPI & "&rdr=" & URLEncode($Processed) & URLEncode("&rdr=" & URLEncode($RefreshRecord))
Unfortunately this doesn't refresh the page of the current record. It actually brings the user to the default List All screen of WIDGETS table.
I've tried a variation of the formula. Here is an example.
$AzureAPI & "&rdr=" & URLEncode($Processed) & URLEncode("&rdr=" & URLEncode("javascript:" & location.reload(true);" & "$.get('" & $RefreshRecord & "');" &"void(0);"))
But to no avail ...
However if I remove the initial AzureAPI call ... the $RefreshRecord works as expected.
$Processed & "&rdr=" & URLEncode($RefreshRecord)
That is great but it defeats the purpose. Clearly when the AzureAPI URL call executes and then returns, it is throwing off the current page focus, and QuickBase is bouncing the user to the main WIGETS table default List ALL page.
Any help would be greatly appreciated.
The first one:
- Clones an existing table record, with its related detail records, that a user is viewing/editing (Successfully)
- Changes a field value on the new record (Successfully)
- Refreshes the screen placing the user in the new record (Successfully)
var text ValueUpdate = URLRoot() &"db/" & [_DBID_WIDGETS] & "?act=API_EditRecord&rid=" & [Clone Record ID#] & "&_fid_54=" & "False" & "&apptoken=######";
var text RefreshRecord=URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Clone Record ID#] & "&apptoken=######";
$Clone & "&rdr=" & URLEncode($ValueUpdate) & URLEncode("&rdr=" & URLEncode($RefreshRecord))
The second one:
- Calls an Azure Cloud API that copies WIDGETS and DETAILS to another system (Successfully)
- Changes a field value on the current record (makes a checkbox "true") (Successfuly)
- Refreshes the screen placing the user again in the current record (Not Successfully)
var text Processed = URLRoot() &"db/" & [_DBID_WIDGETS] & "?act=API_EditRecord&rid=" & [Record ID#] & "&_fid_60=" & "True" & "&apptoken=######";
var text RefreshRecord=URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#] & "&apptoken=######";
$AzureAPI & "&rdr=" & URLEncode($Processed) & URLEncode("&rdr=" & URLEncode($RefreshRecord))
Unfortunately this doesn't refresh the page of the current record. It actually brings the user to the default List All screen of WIDGETS table.
I've tried a variation of the formula. Here is an example.
$AzureAPI & "&rdr=" & URLEncode($Processed) & URLEncode("&rdr=" & URLEncode("javascript:" & location.reload(true);" & "$.get('" & $RefreshRecord & "');" &"void(0);"))
But to no avail ...
However if I remove the initial AzureAPI call ... the $RefreshRecord works as expected.
$Processed & "&rdr=" & URLEncode($RefreshRecord)
That is great but it defeats the purpose. Clearly when the AzureAPI URL call executes and then returns, it is throwing off the current page focus, and QuickBase is bouncing the user to the main WIGETS table default List ALL page.
Any help would be greatly appreciated.