Discussions

Expand all | Collapse all

Multiple redirects in formula

  • 1.  Multiple redirects in formula

    Posted 22 days ago
    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
    ------------------------------


  • 2.  RE: Multiple redirects in formula

    Posted 22 days ago

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



  • 3.  RE: Multiple redirects in formula

    Posted 22 days ago
    Thank you so much! I get a runtime error but I will try to modify it.

    ------------------------------
    Jazmynn Cathey
    ------------------------------



  • 4.  RE: Multiple redirects in formula

    Posted 22 days ago
    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
    ------------------------------



  • 5.  RE: Multiple redirects in formula

    Posted 22 days ago

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