Forum Discussion

JazmynnCathey2's avatar
JazmynnCathey2
Qrew Member
4 years ago

Multiple redirects in formula

I have an embedded report that has a formula url button. The button updates a check box then edits that same record. When it is saved I want it to return to the record that had the embedded report.  The first two parts of my formula work, the checkbox is edited, the form displays and I must complete it, but upon save it is not redirecting to the original record. Can someone offer insight in to what I may be doing wrong with the last redirect?

URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_43=1&apptoken=xxxx"
& "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=er&rid=" & [Record ID#])
& "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_BENE] & "?a=dr&key=" & [Related Beneficiary])

------------------------------
Jazmynn Cathey
------------------------------
  • Not testing but try this. 

    URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
    & "&_fid_43=1&apptoken=xxxx"

    & "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=er&rid=" & [Record ID#])

    & URLEncode(
    "&NextURL=" & URLEncode(URLEncode(URLRoot() & "db/" & [_DBID_BENE] & "?a=dr&key=" & [Related Beneficiary])))




    The generic syntax is below but because you are redirecting after a manual save, you need to use NextURL


    $URLONE 
    & "&rdr=" & URLEncode($URLTWO)
    & URLEncode("&rdr=" & URLEncode($URLTHREE))



    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------
    • JazmynnCathey2's avatar
      JazmynnCathey2
      Qrew Member
      Thank you so much! I get a runtime error but I will try to modify it.

      ------------------------------
      Jazmynn Cathey
      ------------------------------
    • JazmynnCathey2's avatar
      JazmynnCathey2
      Qrew Member
      Thank you Mark, I was able to get it working! I used the generic syntax and defined the variables.
      $URLONE
      & "&rdr=" & URLEncode($URLTWO)
      & URLEncode("&NextURL=" & URLEncode($URLTHREE))

      ------------------------------
      Jazmynn Cathey
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend

        Ok great. Here is a longer version. You just slice off the salami for what you need. 


        $URLONE 
        & "&rdr=" & URLEncode($URLTWO)
        & URLEncode("&rdr=" & URLEncode($URLTHREE))
        & URLEncode(URLEncode("&rdr=" & URLEncode($URLFOUR)))
        & URLEncode(URLEncode(URLEncode("&rdr=" & URLEncode($URLFIVE))))
        & URLEncode(URLEncode(URLEncode(URLEncode("&rdr=" & URLEncode($URLSIX)))))
        & URLEncode(URLEncode(URLEncode(URLEncode(URLEncode("&rdr=" & URLEncode($URLSEVEN))))))



        ------------------------------
        Mark Shnier (YQC)
        mark.shnier@gmail.com
        ------------------------------