Discussions

 View Only
Expand all | Collapse all

Looking to add a button in form that will save the record and return to the Dashboard

Dana Hauser

Dana Hauser09-04-2018 04:42

  • 1.  Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-01-2018 23:16
    I'm needing a Save button in a form that will save the record I just created and return me to the Dashboard. 


  • 2.  RE: Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-02-2018 05:53
    I suggest that you make a button on the Dadhboard to Add Record and it has an option as to where to return to after the Save. Will that solve your problem?


  • 3.  RE: Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-02-2018 05:55
    There is also another technique to use. Where is the User launching the Add Record from now? If launching off another record like a Parent, then there is another technique.


  • 4.  RE: Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-03-2018 04:01
    What I'm trying to do is have a button in a report on the Dashboard that will make a duplicate of that record and bring the user back to the Dashboard.  I've gotten close, but the record doesn't get saved.  I have been able to create a button that duplicates a record and takes you to edit mode for that new record, but I'm hoping to create a smooth flow that takes just one click.

    Thanks,

    Dana


  • 5.  RE: Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-03-2018 04:52
    I�m traveling now and just on an ipad and don�t have the time to post the full syntax.


    If you post your current code I can probably adjust it.


    The trick is to to change the code for the button which adds the record


    This should solve your issue though. I�m using formula variables. If you have not used then before check the help.


    Var Text URLONE = and code here to GenAddRecordForm;


    Var Text URLTWO = and the URL of the Dashboard page;


    $URLONE

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


  • 6.  RE: Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-03-2018 18:04
    The code I'm using is: 

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

    No matter what I do I end up at the edit page for the new duplicate record.


  • 7.  RE: Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-03-2018 19:20
    try this

    var text URLONE = URLRoot()&"db/bnxn6mgw4?a=GenCopyRecord&rid="& [Record ID#];

    var text URLTWO = " and paste in the full url of the Dashboard page including the https: and end in a semi colon.

    for example

    var text URLTWO = "https://mycompany.quickbase.com/db/xxxxxx";


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


  • 8.  RE: Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-03-2018 20:49
    Still doesn't take me back to the Dashboard, just stays at editing the duplicate (unsaved) record.

    I even tried to do it in two steps, where it brings me to the edit page and then I created a Save button that would bring it back to the Dashboard, but it won't save it.  Just shows the original records.

    The best I could come up with, is a button to duplicate and bring to the edit duplicate record page, a Save button to save it and bring you to the saved record in View mode, then a button to return to the Dashboard. 

    I very much appreciate your input.  I'm learning some things regardless, mainly the variables, which is very nice.  


  • 9.  RE: Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-03-2018 20:50
    If I could get it to do this in 2 steps, that would be good enough, but 1 step is ideal. 


  • 10.  RE: Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-03-2018 20:54
    Maybe I do not understand what you are trying to do.  I thought that you wanted to call up an Add Record form as a duplicate of an existing record and have the user make some edits and Save normally and land back on the Dashboard.  Is that what you are trying to do?  If so, please explain again what is not working, in a step by step fashion.

    Or are you actually just trying fully duplicate a record without an manual editing and refresh the dashboard to show the duplicate record added?


  • 11.  RE: Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-03-2018 20:57
    Maybe our posts "crossed" just now.  Please answer my question above so I understand your goal here.


  • 12.  RE: Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-03-2018 21:02
    I was kind of trying to do both.   I have a report of Tasks on the Dashboard, and I have a button in it that I want to duplicate the record, save it and return you to the dashboard, showing that added record in the report.

    I was also trying to do it the other way, where you click the button in the report and end up at the edit form where you could make some changes and then click a Save button that would take you back to the Dashboard, rather than the view mod of that new record.

    My original question was mainly the first one, but both would be useful.  

    Sorry for the confusion. 


  • 13.  RE: Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-03-2018 22:06
    Let me know if you need any further clarification on my last post.  Thanks _


  • 14.  RE: Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-03-2018 22:25
    Well my solution should work for the version where the user duplicates the record in Add Record mode and then Saves.

    As for the button to actually AddRecird and return to the Dashboard, I will have to respond tomorrow. It�s past midnight in my current time zone as I�m traveling.


  • 15.  RE: Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-04-2018 04:42
    I understand, thanks!


  • 16.  RE: Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-04-2018 05:38
    Can you tell me your use case to want to exactly duplicate a record and not edit it. That sounds unusual.


  • 17.  RE: Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-05-2018 00:58
    They want to duplicate a record and then have a different person who won't have the duplicate record function edit it later.  This client is a bit odd with some requests.

    If I could get a button that saves and returns to the dashboard from the edit record screen, I can work with that.  I can't seem to get that function to work yet.  It will return to the dashboard, but won't save the record for some reason.  I can get a save button to work if you'r starting a new record, but if it's from the duplicate record it won't.  The built in save button saves it, but returns you to the record in view mode.  


  • 18.  RE: Looking to add a button in form that will save the record and return to the Dashboard

    Posted 09-05-2018 04:29
    Ok, I understand. I will have to test myself next eeek when I�m back in the office.
    Meanwhile, can you post your current code?

    Also, can you tell me if there are a lot of data entry fields on the form? There is another method using API_AddRecord but it takes some code to populate each field.