formula URL to replicate the QB cancel button

  • 0
  • 1
  • Question
  • Updated 2 months ago
  • In Progress
We have a form that has a button that links the user to an external page out of QuickBase.  If the user decides to click that button then we want the form to be cancelled and a new record not created.  
Photo of Jeff

Jeff

  • 282 Points 250 badge 2x thumb

Posted 2 months ago

  • 0
  • 1
Photo of Evan Martinez

Evan Martinez, Community Manager

  • 11,060 Points 10k badge 2x thumb
Hi Jeff,

If you are running into the experience that when clicking a button that links away the record is being saved one thing to check is the advanced settings for the table. One of the options covers the save behavior "Save parent record automatically when a child record is created", sometimes with a linkaway if that option is checked Quick Base can autosave the record instead of cancelling out. If you try turning off that checkbox you might get the behavior you are looking for without needing a different formula function. 
Photo of Jeff

Jeff

  • 282 Points 250 badge 2x thumb
Thanks for the quick response.  Unfortunately, that option is not checked for this table and would not resolve the problem.

The form has a button and if clicked the record should be cancelled (not saved), the QB window should redirect to the table's homepage and another tab opened with the window the link pointed them to.  It sounds like something a formula-URL could handle.  I just didn't see anyway of mimicking the cancel button with a formula, or javascript.
Photo of Ryan Stanford

Ryan Stanford

  • 1,004 Points 1k badge 2x thumb
If you make a rich text field, instead... you can make it into sort of your own button, and can add JavaScript to it to behave like the cancel button... I'm currently trying to figure out something similar which will act like a save button and then run other JavaScript as well:


"<div class='Tall Vibrant' onclick=$('#cancelButton').click();>Visible text here</div>"