Add a Save button and redirect to the home page (this is not the main form in my table)

  • 0
  • 1
  • Question
  • Updated 5 years ago
  • Answered

I am looking for the formula to save the record from my form (not the main one) and redirect to the home page of my application. I have created the url formula button, but unable to find the correct formula for it. Any help with be great. Thanks.

Photo of Jennifer

Jennifer

  • 0 Points

Posted 5 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,434 Points 20k badge 2x thumb
Use the image onload technique with these two statements:

$("#RedirectURL").val(gReqAppDBID);
$("input[name=rl]").val("");

Reditect To Application Dashboard On Record Save
https://haversineconsulting.quickbase.com/db/bje6j7cxw?a=nwr

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=352


ProTip: The image onload technique solves all problems and should be aggressively taught in school.
Photo of Bennett

Bennett

  • 10 Points
This is very helpful.  If we want to redirect to a specific home page and not necessarily the default page for the role, how would we accomplish that?
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,434 Points 20k badge 2x thumb
Just put your table dbid as the argument to the val() method:

$("#RedirectURL").val("TableDBID");

The table dbid is specified here as a relative URL.
Photo of eduardo

eduardo

  • 40 Points
where can we find the relative URL of a specific page?
Whant to redirect to

https://jxxxx.quickbase.com/db/DBID?a=showpage&pageid=35

Thanks
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,434 Points 20k badge 2x thumb
This is the relative page of that URL:

DBID?a=showpage&pageid=35

However, if you are using the URl to point to the user defined page contents you probably want this relative URL:

DBID?a=dbpage&pageID=35

Or better yet make reference to the name of the user defined page:

DBID?a=dbpage&pagename=foo.html
DBID?a=dbpage&pagename=foo.js
Photo of eduardo

eduardo

  • 40 Points
I am trying to use some of the techniques learned with my favorite “Ninja”.

What I want:
1.-User is on a home page (not the homepage for the role).

2.- sees a report with three buttons on the same field (Formula text field HTML allowed)

Button (think they are links not buttons, not really sure but Works):

[iol] & "gestContracts.js" & [/iol] &
"<a class='Success Vibrant QBU_MyButton'>" & "ACTIVE" & "</a>" &
" <br /> " &
"<a class='Primary Vibrant QBU_MyTeste'>" & "RECALL" & "</a>" &
" <br /> " &
"<a class='Danger Vibrant QBU_MyTall'>" & "RETIRE" & "</a>"

3.- On click, each button, takes me to a different form of a specific Table.

4.- the user introduces some data in the form.

5.- In the form I use the Ninja technique, with Image onload, to redirect on “SAVE”

I was able to redirect to the “HOME PAGE” of the role.

Want every roll to be redirected to a specific home page.

 Will try then:

$("#RedirectURL").val(DBID?a=showpage&pageid=35);
$("input[name=rl]").val("");

Correct?
Photo of eduardo

eduardo

  • 40 Points
worked with show page, and DBID the DBID number no just DBID