Create Button to Add New Record but carryover certain fields from existing record

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
I am creating a package testing application. Each package type can be tested on multiple types of equipment. For each equipment test I'd like to create a new record.

I'd am trying to create a button that allows the user to save the current record and create a new test without having to retype the basic package information each time.

I've found the following code which will save the current form and create a new record with the same info. I'd like to do the same thing only have certain fields with basic package info save to the new record automatically. So essentially, I am saving the package information but wiping the test results to enter a new test onto a new record.

URLRoot() & "db/" & Dbid() & "?a=GenCopyRecord&rid=" & ToText([Record ID#])
Photo of Traci S

Traci S

  • 260 Points 250 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 53,038 Points 50k badge 2x thumb
You have already answered 95% of you Question. So the last 5% is simply to go to the field Proprties that you do NOT want copied over and uncheck the box that says to copy these fields when the report is being copied.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 53,038 Points 50k badge 2x thumb
So the workflow will Be Add Record. Save. Copy. Save.

If you like what you get that working you want to add an extra save button to your form post back and I will give you the code. A trick that I just use for one of my clients is put the extra save button very close to where the copy button was so the user does not need to move the mouse in order to save.
Photo of Traci S

Traci S

  • 260 Points 250 badge 2x thumb
The button functionality works perfectly now. Thanks!