Skip to main content
Question

Magic Buttons - New Method?

  • July 9, 2021
  • 0 replies
  • 363 views

A while back I used Magic Buttons to check/uncheck a checkbox. This URL Formula still works on the old app but with an "Unsupported Content" alert. Using this same method does not work on a newer app I've created. 

I've read that a new method is to move the code to a Code Page then link the URL Formula to that code page for execution. I have been unable to get this to work.

Does anyone have a documented, current method for a working report button to check/uncheck a box (the refresh the report)? 

~~~~Previously Used  (deprecated) URL Formula~~~~

var text URL =

If([Validated] = false,

URLRoot() & "db/" & Dbid() & "?a=api_Editrecord&rid=" & [Record ID#] & "&_fid_52=1&_fid_115=" & URLEncode(User()),

URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_52=0&_fid_115=" & URLEncode(User())
);

"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);"


------------------------------
David Vasquez
------------------------------
This topic has been closed for replies.

JimHarrison
Forum|alt.badge.img+18
  • Registered
  • July 9, 2021
I posted about this. Save & Keep Working function.
search

Rich Text - Formula Fields are pretty nice.



------------------------------
Jim Harrison
transparency = knowledge + understanding : The Scrum Dudes
------------------------------

MarkShnierYou
Forum|alt.badge.img+24
There is a native solution. the first part is the same to define the URL.  The Bold part is what is different.

var text URL =

If([Validated] = false,

URLRoot() & "db/" & Dbid() & "?a=api_Editrecord&rid=" & [Record ID#] & "&_fid_52=1&_fid_115=" & URLEncode(User()),

URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_52=0&_fid_115=" & URLEncode(User())
);

var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();

$URL
& "&rdr=" & URLEncode($RefreshPage)

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------