Forum Discussion
TateForgey
5 years agoQrew Assistant Captain
I love the reload functionality and use it frequently in Formula URL fields, but I have spent longer than I would like to admit trying to get it to work when formatted as a link in a Formula Rich Text field. Is that even possible?
------------------------------
Tate Forgey
------------------------------
------------------------------
Tate Forgey
------------------------------
MarkShnier__You
Qrew Legend
5 years agoTry this Syntax. In this example the button is toggling a checkbox field to the opposite state.
var bool NewToggle = not [Completed?];
var text URL = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_6=" & $NewToggle;
var text Words = [Account Name];
var text URL =
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);";
"<a href=\"" & $URL &"\"" & ">" & $Words & "</a>"
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
var bool NewToggle = not [Completed?];
var text URL = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_6=" & $NewToggle;
var text Words = [Account Name];
var text URL =
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);";
"<a href=\"" & $URL &"\"" & ">" & $Words & "</a>"
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
- MarkShnier__You5 years ago
Qrew Legend
actually that last line can be simplified to this
"<a href=" & $URL & ">" & $Words & "</a>"
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------- TateForgey5 years agoQrew Assistant CaptainAs usual, Coach, you pushed me in the right direction here - SUCCESS! However, I think there could be a couple of small errors in your code. (URL declared twice - that was an error for me although maybe that works in some other way and javascript outside of the anchor tag made that appear as text - when I removed the second URL declaration.) This is a fragment from a long "IF" statement in my variable (why I needed rich text in the first place) that also has a div tag around it, but I'll put in the relevant portion that I got to work in my rich text field. As ever, thank you! Now I can use this field anywhere!
var text URL = URLRoot() & "db/" & [_DBID_SHIFTS] & "?act=API_AddRecord"
& "&_fid_10=" & URLEncode ([ID])
"<a href=\"" &
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);"
&"\"" & ">" & "Add Shift" & "</a>"
------------------------------
Tate Forgey
------------------------------