Skip to main content
Question

Save and New Button creation

  • October 23, 2024
  • 0 replies
  • 82 views

Forum|alt.badge.img+2

I am attempting to streamline (by removing manual actions) our part tracking process for newly machined parts and am looking for a way to add a "Save and New" button to the body of the form that preforms the same way as the built in Save and New button.

Each part after machining is etched with a QR code that contains the relevant data for the part.  Current setup below allows the user to click in the Part 3D Scan box, scan the QR code on the part at which time the data inputted and parsed into the correct boxes then it auto tabs to the Save and New button and pushes enter.

My issue lies with the functionality of the button.  Using the code I found in this forum I can "Save and Edit" however I can not figure out how to modify the code in order for it to open a new record for entry.

var text url = URLRoot() & "db/" & Dbid() & "?a=er&rid=%%rid%%";

var text link = "<a href='" & $url & "' data-replaceRid='true' style='font-size: 11pt;margin-left: 5px; margin-top: 0px; height: 33px; width: 160px; text-align:center;background-color:#13294d;color:white;background-image: linear-gradient(to bottom, #13294d 0%, #13294d 100%);' class='SaveBeforeNavigating Vibrant'>Save and New</a>";

$link

Any suggestions would be appreciated.

MarkShnierYou
Forum|alt.badge.img+22
  • Quickbase Alumni
  • October 23, 2024

It's possible that you are overthinking this.  The record should autosave if you navigate away from the record.

What if you try changing the URL to 

var text url = URLRoot() & "db/" & Dbid() & "?a=API_GenAddRecordForm;


Forum|alt.badge.img+2
  • Author
  • Quickbase Alumni
  • October 23, 2024

You are correct, that works.  Thank you.

Now if I can find a way to get the focus on the page or curser in the box I can eliminate my last click.

Thanks again