Forum Discussion

DavidLichty's avatar
DavidLichty
Qrew Trainee
10 years ago

How do I create a URL button on a QB Form that saves the current record and then displays a report?

Our team frequently works by looking up a record, editing that record, and then looking up the next record.

They start by using a look-up report (Prompt the user for a Record #, for example.)

Currently, they must return to the Home page, or the report list to re-run the look-up report.

I'd like to add a URL button to the native QuickBase form which saves the current record; and then runs the look-up report.

I'm not seeing a way to do this with a single click.

If we click the report button, we are prompted to save the record -- which is OK, but not ideal.

Ideally, I would like to click one button and do both steps.

What ideas / suggestions do you have?

Thank you in advance for your help.

- David in Tucson
  • David,

    I guess this is not possible OOB in QuickBase form since QuickBase always calls the Save dialog before redirecting to the mentioned URL. However, there is a long way to achieve using Image onload by pasting the following code in the Image Onload script.

    $("a:contains('<button text')").off('click').on('click',function(){$("#dialogLinkAway").hide();LinkAwayNo();DoSave()})


    Here the <button text> needs to be replaced with the actual text that you want to show in the button. In the button formula, you just need to place a space character.
  • Thank you Dinesh.

    We implemented the 2-step process and kept going.  

    When I get to experiment I'll try this suggestion.

    - David
  • David, not tested, but maybe there is a simple solution using nexturl to make customized EDIT button.

    var text URLONE = urlroot() & "db/" & dbid() & "?a=er& rid=" & ToText(Record ID#])
    var text URLTWO = urlroot() & "db/" & dbid() & "?a=q&qid=xx"

    $URLONE
    & "&nexturl=" & urlencode($URLTWO)
    • KellyBianchi's avatar
      KellyBianchi
      Qrew Assistant Captain
      This works on desktop for me, but doesn't seem to work in mobile. 
    • PaulVorster1's avatar
      PaulVorster1
      Qrew Cadet
      HI Kelly, did you manage to get a solution for mobile, as I have the same problem?
    • KellyBianchi's avatar
      KellyBianchi
      Qrew Assistant Captain
      No, sorry, I did not. You might just want to add a line of text to instruct users to save and then add their child records.
  • Hi Mark,

    I'm sorry, I'm not following.

    If I'm reading this correctly, URLONE is a link to edit the record.
    URLTWO is a link to display a report

    I can't find anything about nexturl in the help.  Is this a parameter for URL calls, or simply the name of the variable you defined in your example.

    I'm interested and not quite following.

    Would this button be on the original report?  
    - when clicked open the record for editing and then go back to the report when saved?


    Thank you for your help.

    - David
  • I'm expecting that you would put this button on your report that you want to return to - which is the one with the <ask the user> question.  You might even suppress the regular edit button on the report and put in this as a little button as the first column of the report.

    The "&nexturl=" part is undocumented but it seems to work in all the situations I have used it on so far.
  • Thank you Mark.  I'll experiment with it and let you know what I find. - David