Forum Discussion

40711's avatar
40711
Qrew Member
26 days ago

Approval Button redirect to View Form

I used the magic buttons app Approval Button, and it seems to work great! But I noticed that it redirects back to whichever version of the form you were on when you clicked the button - if you click it from the View Form, it takes you back to the View Form version, whereas if you click it from the Edit view, it keeps you in Edit view. I'd like it to redirect to the View view in either case so that the User understands that it has been saved. Anyone know how to do this? Here's the formula:

URLRoot() & "db/" & Dbid() & 
"?a=API_EditRecord&apptoken=APPTOKEN&rid=" 
&[Record ID#] & "&_fid_139=Approved&_fid_141=" & 
Now() & "&_fid_140=" & UserToEmail(User()) & "&rdr=" 
& URLEncode(URLRoot() & "db/" & Dbid() &"?a=doredirect&z=" & Rurl())

  • np, change the last part to this

     

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

2 Replies

  • MariaPeralta's avatar
    MariaPeralta
    Community Manager

    It's because of the z=rurl() at the end of the url. This specifically says to take you back to where you started. You'll probably want to use an rdr or a nexturl depending on your workflow. Hope this helps! -M

    https://community.quickbase.com/discussions/quickbase-discussions/formula-url---edit-then-add/86646

    https://community.quickbase.com/blog/the-qrew-blog-/trying-to-redirect-to-the-parent-table-after-savingediting-a-record-/83731

    https://community.quickbase.com/discussions/quickbase-discussions/using-zrurl-and-rdr-in-formula-url-fields/83973

  • np, change the last part to this

     

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