Forum Discussion

StevenNelson's avatar
StevenNelson
Qrew Member
3 years ago

URL button to edit then refresh page

I put the following code into a Formula URL field.  The purpose is to change the status to completed by clicking the button.

URLRoot() & "db/" & [_DBID_LOTO] & "?a=API_EditRecord&rid="&[Record ID#]&"&_fid_37=Completed"

Works great, but it then goes to the response page below.  Which I don't want.  How do I modify the code above to simply change the status and refresh the page.



------------------------------
Steven Nelson
------------------------------

10 Replies

  • TateForgey's avatar
    TateForgey
    Qrew Assistant Captain

    Good news and bad news. I had an inkling as we were chatting and testing just confirmed that this is an issue related to the new navigation. When I switched back to the top navigation in "My Preferences" this button worked as expected. Switching back to the side nav resulted in the incorrect redirect again. So, that seems like a solid thing for QB to track down.

    It is important to remember this is a feature that still in beta, but I'm still keeping side nav on. It is just too good! I'll put in a bug report now. I expect the other weird redirects were caused by the new nav as well. 

    • ben_simon's avatar
      ben_simon
      Community Manager

      TateForgey MarkShnier__You I tracked down an existing escalation that's already open for this.

      Tate, your support case can get added to it. At the very least, it's a bug Quickbase has on its radar and product team is working through a resolution for.

    • TateForgey's avatar
      TateForgey
      Qrew Assistant Captain

      Sorry, Coach. I was more saying this in case others were seeing weird behavior. I'm not sure if you have been seeing this, but this week I have noticed that redirects in the app have been landing me in some unexpected places.

      In any case, this is the code for the button that redirects me to the home page of the app and no longer keeps me on the same page. The better thing for me to do would have been to enter a bug report here. If you don't see anything with this code, I'll go ahead and do that. Thanks (as always!) for your help. 

      URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" 
      &"&rid=" & [Record ID#] 
      & "&_fid_6=Yes"
      & "&rdr=" & URLEncode( URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl())

       

      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend

        OK, I can confirm. I have also had random examples where that perfectly good code does not work. It redirect me to the app homepage instead of refreshing the page I'm on

        Anyways, the next time this happens to me or you, we should put in a bug report so they can fix it. 

        I have not been able to understand the pattern of why the button mostly works, but then sometimes does not.

  • I figured it out

    URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &

        "&rid=" & [Record ID#] &

        "&_fid_37=Completed" &

        "&_fid_39="&Now() &

        "&_fid_44="&UserToName(User(),"FF")&

        "&rdr=" &

        URLEncode(URLRoot() & "db/" & AppID())



    ------------------------------
    Steven Nelson
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend

      In fact this should refresh the page you were on ..

      URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &

          "&rid=" & [Record ID#] &

          "&_fid_37=Completed" &

          "&_fid_39="&Now() &

          "&_fid_44="&UserToName(User(),"FF")




      & "&rdr="&URLEncode( URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl())


      ------------------------------
      Mark Shnier (YQC)
      mark.shnier@gmail.com
      ------------------------------
      • TateForgey's avatar
        TateForgey
        Qrew Assistant Captain

        FYI - As of today this is no longer working for me. This worked for a while, but I can only assume something changed in QB that prevents this from working properly. I am brought to the home page of the app using this code now. :(