Discussions

 View Only
Expand all | Collapse all

Save button with a redirect

Jordan Beatty

Jordan Beatty05-18-2017 18:33

QuickBaseCoach Dev./Training

QuickBaseCoach Dev./Training05-18-2017 18:34

Archive User

Archive User09-10-2018 05:15

  • 1.  Save button with a redirect

    Posted 05-18-2017 16:56
    I haven't found a thread yet with a solution that is working with me so, I am trying to to make a button that saves and redirects. Currently I am trying 

    <div class='Vibrant Success' onclick='RedirectURL.value=myurlhere;editform.rl.value="";DoSave();'>Save</div>

    I got my current setup from this thread https://community.quickbase.com/quickbase/topics/how-can-i-save-and-redirect-to-a-home-page">https://community.quickbase.com/quickbase/topics/how-can-i-save-and-redirect-to-a-home-page">https://community.quickbase.com/quickbase/topics/how-can-i-save-and-redirect-to-a-home-page 

    This thread is the closest thing to what I am looking for. I would like to be able to save a form and then be redirected to a different table and its default report. Is there an easier solution? 


  • 2.  RE: Save button with a redirect

    Posted 05-18-2017 17:10
    Yes,

    I'm just on my iPhone now, but you can use this contract.

    var text URLONE =. Insert your first URL here ;
    var text URLTWO =. Insert your next URL here ;

    $URLONE
    & "&rdr=" & URLEncode(NextURL )

    The first URL would be the one where you are using GenAddRecordForm


  • 3.  RE: Save button with a redirect

    Posted 05-18-2017 17:53
    var Text URLONE =. https://example.quickbase.com/1 ;

    var Text URLTWO =. https://example.quickbase.com/2 ;

    $URLONE 
    & "&rdr=" & URLEncode(NextURL )

    Is telling me variable declaration must end with a semi colon


  • 4.  RE: Save button with a redirect

    Posted 05-18-2017 18:13
    If you post hour formula I can hep correct it.  But you need to end each of the two formula variable lines with a semi colon.

    var Text URLONE ="https://example.quickbase.com/1";

    var Text URLTWO ="https://example.quickbase.com/2";

    $URLONE 
    & "&rdr=" & URLEncode($NextURL )

    Also I had an error on the last line.


  • 5.  RE: Save button with a redirect

    Posted 05-18-2017 18:24
    Ahhh yes, I forgot the quotation marks, silly mistake on my part. 

    Currently the formula is:

    var Text URLONE ="https://clearpath.quickbase.com/db/bmr3y249a?a=nwr";

    var Text URLTWO ="https://clearpath.quickbase.com/db/bmr3y225t?a=td";

    $URLONE 
    & "&rdr=" & URLEncode(NextURL)

    I too am getting an error on the last line


  • 6.  RE: Save button with a redirect

    Posted 05-18-2017 18:28
    Right, so I corrected that in my previous post. Needs to be $NextURL.



    & "&rdr=" & URLEncode($NextURL)


  • 7.  RE: Save button with a redirect

    Posted 09-27-2018 20:45
    I am using the save and redirect technique to allow everyone on the internet to submit fraud concerns through our Quick Base application.  After saving the record they are directed to an internal html splash page thanking them for bringing the concern to our attention.  I would like to be able to provide them with a reference number (record ID# of the record they saved) so when they are reached for follow-up it's easy to know which submittal we are referencing. 

    Any suggestions for getting the record ID# on the splash page? _


  • 8.  RE: Save button with a redirect

    Posted 09-28-2018 01:23
    I suggest not redirecting to a splash page, , but rather displaying the saved record on an alternate form. The form would be used in View mode. For the EOTI Role.

    It can have all the HTML you like using formula Rich Text Fiekd. But it can thus provide the Record ID.


  • 9.  RE: Save button with a redirect

    Posted 11-05-2018 14:27
    Currently the formula for my button is: "<a  class='Vibrant Success' href='javascript:LinkAway(\"" & URLRoot() & "db/" & Dbid() & "?a=dbpage&pagename=Thank You for Submitting.html" & "\");' >Submit</a>"

    How would I change that to save and go to a specific form?_


  • 10.  RE: Save button with a redirect

    Posted 11-05-2018 14:32
    Are you asking now to display the record you just created on a different form, or do you know the record ID and the table that you want to redirect to?


  • 11.  RE: Save button with a redirect

    Posted 11-05-2018 15:00

    To display the record you just created on a different form, so that when submitted by EOTI they only see a HTML heading I display on that form as well as the record ID of the record they just submitted.  That way if they have any questions or want to follow up they can use the record ID# as a reference number.


  • 12.  RE: Save button with a redirect

    Posted 11-05-2018 15:38
    So for EOTI, what I do is to use 1 form set to be used, in forms usage for ADD / Edit, and then another form for View.  

    Then I would just have a regular save button, not the Link away.


  • 13.  RE: Save button with a redirect

    Posted 05-18-2017 18:33
    This did the trick, thank you! 


  • 14.  RE: Save button with a redirect

    Posted 05-18-2017 18:34
    Great, thx for letting me know.


  • 15.  RE: Save button with a redirect

    Posted 05-19-2017 12:25
    Mark
    Can you tell me why you put $NextURL and not $URLTWO ?


  • 16.  RE: Save button with a redirect

    Posted 05-19-2017 12:55
    That was muddled,  I was trying to answer questions on an iPhone while cleaning out my basement yesterday



    This would work if the first API was like API_GenAddRecordForm where you want to control where to land the user after the save.

    var Text URLONE ="https://clearpath.quickbase.com/db/bmr3y249a?a=nwr";

    var Text URLTWO ="https://clearpath.quickbase.com/db/bmr3y225t?a=td";

    $URLONE 
    & "&NextURL=" & URLEncode($URLTWO)

    Sorry for that confusion.


  • 17.  RE: Save button with a redirect

    Posted 05-19-2017 14:13
    Now I understand.  Cool :)


  • 18.  RE: Save button with a redirect

    Posted 09-09-2018 22:54
    Is there a way to do this without getting the QB prompt: 

    "You've made changes to this Service Request. Do you want to save these changes before going to the next screen?"

    I'd like it to just save the record and redirect, is there a way to skip the "are you sure" part? 


  • 19.  RE: Save button with a redirect

    Posted 09-10-2018 01:05
    Try going to the Table 
    Advanced Settings
    and check the box for :  Save parent record automatically when a child record is created.



  • 20.  RE: Save button with a redirect

    Posted 09-10-2018 05:15
    Worked perfectly! Thank you! 


  • 21.  RE: Save button with a redirect

    Posted 09-14-2018 14:50
    Hey Mark,

    I'm trying to set this up to send me to a certain report (within the same table) once I click the save button in a form. Is this possible?

    I've set up the following in a Formula URL field and placed the button in the form:

    var Text URLONE ="[my data entry form URL]";
    var Text URLTWO ="[my report URL]";
    $URLONE 
    & "&NextURL=" & URLEncode($URLTWO) 

    But, it's only saving and keeping me in the same form, opened to the next new record.


  • 22.  RE: Save button with a redirect

    Posted 09-14-2018 14:56
    It should work.  Can you post your complete code?  You can disguise any company specific info if you need to.


  • 23.  RE: Save button with a redirect

    Posted 09-14-2018 15:06
    var Text URLONE ="https://tltransportation.quickbase.com/db/bm3qmxh8k?a=nwr";

    var Text URLTWO ="https://tltransportation.quickbase.com/db/bm3qmxh8k?a=q&qid=22";

    $URLONE 
    & "&NextURL=" & URLEncode($URLTWO)


  • 24.  RE: Save button with a redirect

    Posted 09-14-2018 15:08
    It really should work

    Maybe try  this

    var Text URLONE ="https://tltransportation.quickbase.com/db/bm3qmxh8k<b alt="" title="" name="" value="" type="" target="" rel="">?act=API_GenAddRecordForm</b>;

    var Text URLTWO ="https://tltransportation.quickbase.com/db/bm3qmxh8k?a=q&qid=22";

    $URLONE 
    & "&NextURL=" & URLEncode($URLTWO)


  • 25.  RE: Save button with a redirect

    Posted 09-14-2018 15:16
    Thanks! I'm getting this error back though 


  • 26.  RE: Save button with a redirect

    Posted 09-14-2018 15:21
    something got messed up on my post by this forum when i tried to bold the change.

    try this for the first formula variable.


    var Text URLONE ="https://tltransportation.quickbase.com/db/bm3qmxh8k?act=API_GenAddRecordForm";


  • 27.  RE: Save button with a redirect

    Posted 09-14-2018 15:31
    Strange, it is opening a new record in a separate tab while leaving the original record open and unsaved. 


  • 28.  RE: Save button with a redirect

    Posted 09-14-2018 15:35
    The checkbox on the URL formula field should not be set to open in a new tab.

    But let me be sure I understand what your workflow is.  Your are supposed to have this button on the report.  You click the button and a blank form should open.  You then save the record normally and it should re-display the report.


  • 29.  RE: Save button with a redirect

    Posted 11-07-2019 07:49
    Hi..I am also working on similar problem. 
    Basically I have created a form to create a new leave request.
    I have added a save button which is supposed to save the entry and reload the same form in editable form
    I have added a submit button, which once clicks submits the request and closes the form and get redirected to main report page for this table.

    The problem I am facing is that on clicking the save button, the entry is aved, however a new form is being open instead of the same editable form.

    I am using the code below :

    var Text URLONE ="https://mbs.quickbase.com/db/bp3asiycp?a=nwr";

    var Text URLTWO ="https://mbs.quickbase.com/db/bp3asiycp?a=er&r=";

    $URLONE
    & "&rdr=" & URLEncode($URLTWO)

    Pls help!



    ------------------------------
    Ankit Pruthi
    ------------------------------



  • 30.  RE: Save button with a redirect

    Posted 11-07-2019 10:28
    var Text URLTWO ="https://mbs.quickbase.com/db/bp3asiycp?a=er&r=";

    That looks to be your problem. You are not inserting anything into this, you are telling it to go to a blank record.

    However I believe there is another problem here. When creating a new record the Record ID does not exist so I don't think you can actually insert a record id into your second URL from there. 




  • 31.  RE: Save button with a redirect

    Posted 11-07-2019 10:43
    Ankit
    are you trying to do a save and Keep working?  If so that can be one natively if you enable that option for the form in Form Properties, then the user can select at the top instead of just Save, they can select Save and Keep working.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------



  • 32.  RE: Save button with a redirect

    Posted 09-14-2018 16:06
    Mark,

    I unchecked the open in new tab box, and now it does save the record, closes it, and opens a new one in its place. That is an improvement! but not the one I was looking for. It also prompts me with this at every click, which would be tedious for users:



    Any ideas around this prompt?

    As for your request:

    Current workflow: The user goes to Table X, clicks "Add New Record", fills out data in form, clicks "Save & close", user is shown the saved record (view mode).

    Desired workflow: The user goes to Table X, clicks "Add New Record", fills out data in form, clicks "Save & close", user is shown a report called "Today's Records" that I've created. 

    This way they can keep track of records already entered for the day

    Thank you for your help so far!!


  • 33.  RE: Save button with a redirect

    Posted 09-14-2018 16:21
    The intention is for this button to be on the report.  You would launch off the report.  There would be a column of identical buttons on the report.  The user would click any of the identical buttons to start the workflow. 


  • 34.  RE: Save button with a redirect

    Posted 09-14-2018 16:27
    Ah I see now, it works perfectly, thanks for clearing that up!! I was placing it within the form itself.