Learn how to copy records from the Live App using Record Actions here in this article.
Use Case
This article will walk you through how to set up the option to copy records in your Live App using record actions on a form.
Requirements
Steps
Add a Self-Referencing Connection
We'll create a connection field that links the table containing the desired duplicate records to itself. This will establish a connection within the same table.
In this example, Employees are tracking their Hours, and we want them to have the option to copy previous Hours. We're adding the connection field on the Hours table to connect to itself.
Add a Form
On a Details page that displays the specific record you want to copy, we'll add a form view for updating that page's record.
In this example, we're adding a new form for updating the Hours record on the Hours details page. We’re calling the form “Copy Record”.
We want this form to have no fields since we want to access the record actions only:
Add a Record Action
Now, we'll go to the "Actions & Rules" section of the view editor for that form and select the Record Actions tab.
We'll create a new record action to insert a new record connected to this record. We'll assign the fields that we want to duplicate and set them to inherit the form value of the same field.
Congratulations! You can now duplicate your records. 🚀
Notes
Copy Records with Action Links
Action links have the option to trigger actions similar to record actions. These can also be used in other view types to insert a connected record and copy a record.
You can learn more about using action link triggers here.
Copy Records in Tables
Record actions are also available in grid views that have inline editing enabled. You can learn more about using record actions with grid views here.