Forum Discussion

Re: Magic Buttons Code - Return Instead of Redirect

Everett, I appreciate your reply; that does seem to be a workaround.

I'd still like to know why this particular formula has this issue when other buttons I use work properly. I had a standard formula on a button that upon clicking, it would change the task status to Completed, then refresh on the report page. No report settings need to be changed for that to not redirect. This is a pretty lengthy formula, but I would assume it should work the same way. Any other ideas?

------------------------------
Courtney F.
------------------------------

4 Replies

  • MarkShnier__You's avatar
    MarkShnier__You
    Icon for Qrew Legend rankQrew Legend
    I think that Everett is correct.  Perhaps you were remembering the behaviour of other buttons when used on a on a record, not a report.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------
    • CourtneyFrisby's avatar
      CourtneyFrisby
      Qrew Member
      Mark,
      This is another code from Magic Buttons that I use on many reports to change a status and it returns to the report I was on originally. 
      var text url =
      
          URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
          "&rid=" & [Task ID] &
          "&_fid_143=Completed" &
          "&_fid_166=100";
      
      "<a class=\"Vibrant Success\" href=\"javascript:" & "$.get('" & $url &
          "', function(){" & "location.reload();" & "});" &
          "void(0);\">15B. Change the status to completed and return</a>"​

      Are you saying that the original button code I had posted can't be coded to refresh while on a report? 



      ------------------------------
      Courtney F.
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Re:Are you saying that the original button code I had posted can't be coded to refresh while on a report? 

        The code for the Magic Buttons app is different as it is not using images.  I do know that when you make and simple formula Rich Text hyperlink which uses this syntax

        <a href=" & $URL & ">" & $WordsOrImage & "</a>"

        Then clicking that button on a report will have an inadvertent effect to open up the record to view.  Your magic buttons example does seem to use that syntax.

        I don't know of a way to recode it, but I can't say that there is not a way to recode it.

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