How to have my custom Add Button Url on my dashboard return to the dashboard after it is saved?

  • 1
  • 1
  • Question
  • Updated 2 years ago
  • Answered

I have a custom Add Record url button on my dashboard that prepopulates a field and goes to a particular form. Right now on Save, the url redirects it to a report in my table. I want it instead to go back to my dashboard. What do I need to adjust in my formula below to make it go back to the dashboard after Save rather than to the report if my pageid=78:

https://salesstaff.quickbase.com/db/bjuz6j9xp?a=nwr&dfid=10&_fid_124=1&nexturl=https%3A%2F%2Fsalesstaff.quickbase.com%2Fdb%2Fbjuz6j9xp%3Fa%3Dq%26qid%3D19 

I tried changing the qid%3D19 to pageid%3D78, but that didn't work.

Direction appreciated! 

Dawn

Photo of Dawn

Dawn

  • 40 Points

Posted 3 years ago

  • 1
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
I suggest that you do this to get the proper code

Make a URL formula field like this in order to do the URLEncoding for the last part of the URL

"https://salesstaff.quickbase.com/db/bjuz6j9xp?a=nwr&dfid=10&_fid_124=1&nexturl="

& URLEncode("... and then paste in the URL of your page that you want to go to ending in ?a=showpage&pageid=78")



That URL formula will generate the text that you need to paste into the button on the Dashboard
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
here is an example fomr one of my apps

https://plastidip.quickbase.com/db/xxxxxxx?a=nwr&dfid=10&nexturl=%2Fdb%2Fyyyyyyy%3Fa%3Dshowpage%26pageid%3D78

in the above the xxxx was the table where I am adding a record and the yyyyy is the application home page id.

The action to show page is called ?a=showpage&pageid=78
Photo of Dawn

Dawn

  • 40 Points
As usual, Mark, you ROCK! Thank you so much! It amazing the things I can learn from you! Works like a charm...
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
:) thx.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,044 Points 20k badge 2x thumb
>Make a URL formula field like this in order to do the URLEncoding for the last part of the URL

You don't need to create an extra field to find the URL Encoded value of a URL. Rather just do this: (1) Press F12 to expose the browser's Development Tools, (2) click on the Console and (3) enter this line of JavaScript:

escape("https://plastidip.quickbase.com/db//db/yyyyyyy?a=showpage&pageid=78")

// output: "https%3A//plastidip.quickbase.com/db//db/yyyyyyy%3Fa%3Dshowpage%26pageid%3D78"

To URL Decode use unescape:

unescape("https%3A//plastidip.quickbase.com/db//db/yyyyyyy%3Fa%3Dshowpage%26pageid%3D78")

// output: "https://plastidip.quickbase.com/db//db/yyyyyyy?a=showpage&pageid=78"
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Wow, that worked easily in Chrome.  unescape is also handy too as there is no Un-URLEncode function in QuickBase
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,044 Points 20k badge 2x thumb
We will incrementally get you to accept JavaScript, jQuery, and eventually Category Theory.

In the meantime just repeat this to yourself endlessly:

jQuery is a Monad and a Monad is just a Monoid in the Category of Endofunctors, what's the problem?
Photo of Ben L

Ben L

  • 120 Points 100 badge 2x thumb
You can also just add the URL for the homepage/dashboard after the &nexturl=, with no quotes.

https://salesstaff.quickbase.com/db/bjuz6j9xp?a=nwr&dfid=10&_fid_124=1&nexturl=https://salesstaff.quickbase.com/db/*********


where *********=your dashboard DBID
Photo of Ben L

Ben L

  • 120 Points 100 badge 2x thumb
Apparently, something has changed in QB where adding a full URL after &nexturl= doesn't work. So now, if you add the dbid after &nexturl=, the link will work.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
I agree.  This just broke today in my apps.  When I get a chance I will put in a bug ticket to ask if they consider this new behaviour a bug.
Photo of Alec

Alec

  • 62 Points
Can you post an update here when you hear back?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
I have out in this ticket

&NextURL was broken this weekendWe used to be able to have a URL formula like this

var text URL = URLRoot() &"db/" & Dbid() & "?a=er&rid=" & ToText([Record ID#])
& "&nexturl=" & URLEncode("https://mycompany.quickbase.com/db/xxxxxxx");
$URL


But now after the weekend update we need to do this

var text URL = URLRoot() &"db/" & Dbid() & "?a=er&rid=" & ToText([Record ID#])
& "&nexturl=" & URLEncode("xxxxxxy");
$URL

ie, the weekend update broke all our &NextURL formuals

Is this considered a bug and will be urgently fixed? Or do we have to fix all our &NextURL formulas
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Here is the response from Support

Thank you for contacting the QuickBase Care Team! This is a known issue. Our engineers are actively working on a fix for this as we speak. I'll notify you as soon as possible once have a resolution.

Regards,
James Travaglini
QuickBase Support

Please do not reply to this emai
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
QB Support says this is fixed.


Your original question: &NextURL was broken this weekend...

Our Response: Hi Mark,

This issue has been resolved. Can you try testing your button and confirm that the fix has resolved your problem?

Best,
James Travaglini
QuickBase Support