Forum Discussion
QuickBaseCoachD
7 years agoQrew Captain
When you use that Syntax the one disadvantage is that it will hide any error messages.
The way to debug is to comment out or remove that javascript and end the formula with a like that says $URL
But since you code looks perfect, odds are that in Advanced properties for your app you have the requirement for Application Tokens enabled, which is an extra layer of security. So either just uncheck that requirement, or create an app token and add in a line to the URL like this
var text URL = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&key=" &
"&rid=" & URLEncode ([Record ID#]) &
"&_fid_80= " & $NewToggle
& "&apptoken=xxxxxxxxxxxx";
The way to debug is to comment out or remove that javascript and end the formula with a like that says $URL
But since you code looks perfect, odds are that in Advanced properties for your app you have the requirement for Application Tokens enabled, which is an extra layer of security. So either just uncheck that requirement, or create an app token and add in a line to the URL like this
var text URL = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&key=" &
"&rid=" & URLEncode ([Record ID#]) &
"&_fid_80= " & $NewToggle
& "&apptoken=xxxxxxxxxxxx";
RobIV
7 years agoQrew Cadet
I have a question. Why would you pass in an empty 'key=' to the URL? It isn't listed in the docs for API_EditRecord when building the URL alternative to the method.
Example from the docs:
https://target_domain/db/target_dbid?a=API_EditRecord&rid=154
&_fnm_second_year=1776&_fid_8=changed&update_id=992017018414
&ticket=auth_ticket&apptoken=app_token
Link to the docs:
https://help.quickbase.com/api-guide/edit_record.html
I'm just curious. I can't see the need for it.
~Rob
Example from the docs:
https://target_domain/db/target_dbid?a=API_EditRecord&rid=154
&_fnm_second_year=1776&_fid_8=changed&update_id=992017018414
&ticket=auth_ticket&apptoken=app_token
Link to the docs:
https://help.quickbase.com/api-guide/edit_record.html
I'm just curious. I can't see the need for it.
~Rob