Forum Discussion
CarrieKrakowski
3 years agoQrew Member
Hi there,
I realize this is a very old post and my issue may be because of this, but hoping to get some insight into how to do this.
I have a number field I'm trying to increase in a Kanban report with a button click, then refresh the data on the page (even better if we could use Ajax).
I'm trying to create this in a Formula - URL button but when I go to save , I get the error:
Here is my code:
var text URL = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Task ID]
& "&apptoken=XXXXX"
& "&_fid_76=" & [Duration Plus One];
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);"
Any help is much appreciated! Thanks!
------------------------------
Carrie Krakowski
------------------------------
I realize this is a very old post and my issue may be because of this, but hoping to get some insight into how to do this.
I have a number field I'm trying to increase in a Kanban report with a button click, then refresh the data on the page (even better if we could use Ajax).
I'm trying to create this in a Formula - URL button but when I go to save , I get the error:
There are one or more problems with your entry
Only text, Quickbase-accepted functions, fields, variables, and certain HTML tags are allowed in this field. JavaScript is not supported.
Here is my code:
var text URL = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Task ID]
& "&apptoken=XXXXX"
& "&_fid_76=" & [Duration Plus One];
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);"
Any help is much appreciated! Thanks!
------------------------------
Carrie Krakowski
------------------------------
MarkShnier__You
Qrew Legend
3 years agoRight, so they took away JavaScript from us and we used to use it to refresh the page. But they gave us a new replacement code. The code in bold below will refresh whatever page you are on even if you click a button on an embedded child report on a form for example.
Do you need the generic syntax below in this format.
$URLONE
& "&rdr=" & URLEncode($URLTWO)
So, in your use case you want to do the update and then you want to refresh the page.
var text URL = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Task ID]
& "&apptoken=XXXXX"
& "&_fid_76=" & [Duration Plus One];
var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();
$URL
& "&rdr=" & URLEncode($RefreshPage)
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
Do you need the generic syntax below in this format.
$URLONE
& "&rdr=" & URLEncode($URLTWO)
So, in your use case you want to do the update and then you want to refresh the page.
var text URL = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Task ID]
& "&apptoken=XXXXX"
& "&_fid_76=" & [Duration Plus One];
var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();
$URL
& "&rdr=" & URLEncode($RefreshPage)
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
- CarrieKrakowski3 years agoQrew MemberBeautiful! Works perfectly. Thank you for the speedy response!
------------------------------
Carrie K
------------------------------