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

4 Replies

  • 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
      ------------------------------
      • StevenNelson's avatar
        StevenNelson
        Qrew Member
        I changed field 44 to a user field.  I need to get rid of the "usertoname" part of the code but when I do it says "&" cannot be applied to a user field.  What am I doing wrong?
        "&_fid_44="& User()

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