Forum Discussion

40711's avatar
40711
Qrew Trainee
5 months 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#])

  • 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#])

  • 40711's avatar
    40711
    Qrew Trainee

    Hey I have a very similar situation - but I want to redirect back to the view version of the form they were just on. Redirecting to the Record ID takes them to the form designated by their role. But we have 30+ forms for one table (I know), so I need the redirect to take them back to the view version of whatever form they were just on. Or even a specific form, but I don't know how to send them to a specific form. Anyone?

  • 40711's avatar
    40711
    Qrew Trainee

    Answered my own question! "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#]&"&dfid=34")