Forum Discussion

DavidVasquez1's avatar
DavidVasquez1
Qrew Member
3 years ago

Magic Buttons - New Method?

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
------------------------------

4 Replies

  • I posted about this. Save & Keep Working function.
    search

    Rich Text - Formula Fields are pretty nice.



    ------------------------------
    Jim Harrison
    transparency = knowledge + understanding : The Scrum Dudes
    ------------------------------
    • DavidVasquez1's avatar
      DavidVasquez1
      Qrew Member
      Thanks, Jim. I started working this solution but didn't make it to 100% success. The native solution provided by Mark was sufficient.

      ------------------------------
      David Vasquez
      ------------------------------
  • 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
    ------------------------------
    • DavidVasquez1's avatar
      DavidVasquez1
      Qrew Member
      Thanks, Mark! Worked perfectly.

      ------------------------------
      David Vasquez
      ------------------------------