Welcome to QB and building out the logic of using the API to make multiple things happen. The piece I gave you was a sample of what you will need to build. Let me break it down a bit:
var text URLGenAdd = This is how you define text variable
URLRoot() This says that the beginning of your variable will use the root of your QB Realm. So if you work at 811.quickbase.com, that is what will be passed into the variable. If you were executing a search at Google you would be using their address
& This just means "and" it is how we string together parts of what you want to execute
"db/" This is how we BEGIN to tell Quickbase what table in your application we are going to use
& Dbid() This means to use the current table. Since you are copying a record, you will want to create a record in the very same table. Your next business problem might mean that you want to create a record in a table called Opportunity. That would mean that your expression would change to &[Opportunity].
& "?a=API_GenAddRecordForm This is you telling Quickbase that in the table reference before, you want to open a form to add a record.
&_fid_8=" This means that I want to put data into Field #8 for the User so they will not have to do that manually. You said that you want to copy a record. You will need to specify which fields are filled for the User
& URLEncode ([Record ID#]) This is saying to put the value of the Record ID into the field just defined. So Field ID 8 would get the value of the Record ID from where the User pushes the button.
& "&dfid=10" This means means to use Form #10 for the user. This allows you control what the User gets to see and must fill in. Maybe when you Copy a Ticket, you want them to fill out a Notes field but not change the Customer Name, Start Date or Status. Your form would only show the Notes field. After the User saves that record, the new Ticket, they can always come back and edit it with other things.
; The semicolon at the end is crucial. This tells QB that you are done building the variable, which in your case is a formula to create a new Ticket on a specific form with information from the old one.
So back to making this work for you. You need a few more things.
Create a variable to display a message for your User. Something like this
var text MSGCopy = "Click to Copy";
then make a formula to string this all together as a hyper link
var text HTMLCopy = "<a href=" & $URLGenAdd & ">" & $MSGCopy & "</a>"; This is an HTML formula. I suggest looking at W3 Schools to assist with understanding how it works. It is NOT specific to Quickbase.
The last thing is to show your User the formula on the page. QB will use variable when you put a dollar sign in front of it.
$HTMLCopy This is the very bottom of your field and is the executable part for the User. They will see the words from your Message variable and can click it to land on a new form, that is filled with the data from the original record.