Skip to main content
Solved

Approval Button redirect to View Form

  • June 26, 2024
  • 0 replies
  • 406 views

Amber
Forum|alt.badge.img+2

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

Best answer by MarkShnierYou

np, change the last part to this

 

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

Maria
Forum|alt.badge.img+19
  • Community Manager
  • June 26, 2024

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


MarkShnierYou
Forum|alt.badge.img+24

np, change the last part to this

 

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


Amber
Forum|alt.badge.img+2
  • Author
  • Registered
  • November 7, 2024

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?


Amber
Forum|alt.badge.img+2
  • Author
  • Registered
  • November 7, 2024

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