Forum Discussion

KimRavizza's avatar
KimRavizza
Qrew Cadet
5 years ago

Save before print

Hello,

I've created a rich-text button to print my exact form:

"<a href='javascript:LinkAway(\"" & URLRoot() & "db/" & Dbid() & "?a=dbpage&pagename=" & URLEncode("survey results.html") & "&clist=a&rid=" & [Record ID#] & "\");' ><img src=\"https://xxx.quickbase.com/up/999999/g/rn/eg/va/Submit%20and%20Print%20Button.JPG\" height=\"30\"></a>"

This button works great if I've already saved the record, but it is a very short survey and I don't want users to have to save and then submit to print. Is there a way I can add a "save" to the above command?

Thank you,

------------------------------
Kimberley
------------------------------

4 Replies

  • Is the Table's  Advanced Properties setting checkboxes to Save Parent Automatically when a child is added?

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • KimRavizza's avatar
      KimRavizza
      Qrew Cadet
      Hi Mark,

      Yes, it is. But I'm trying to save a record to the table that I'm in. The problem is that when I press the button, the record hasn't been saved yet, so there is no record ID.

      ------------------------------
      Kimberley
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew Champion
        Sorry, I have no ideas for this one without contracting for a script of some kind..

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------
  • Kirk added a new button in the Magic Buttons app from the exchange that he calls "save and redirect anywhere".

    I merged his code with yours. I haven't tested it, but try this Kimberly:

    var text redirectafter = URLRoot() & "db/" & Dbid() & "?a=dbpage&pageName=" & URLEncode("survey results.html") & "&clist=a&rid=" & [Record ID#] & "\";

    "<a onclick='RedirectURL.value=\"" & $redirectafter & "\";
    editform.rl.value=(\"\");DoSave()'; href='#' ><img src=\"https://xxx.quickbase.com/up/999999/g/rn/eg/va/Submit%20and%20Print%20Button.JPG\" height=\"30\"></a>"

    ------------------------------
    Adam Keever
    ------------------------------