Is there any button to duplicate a record? or we can add a button to duplicate?
Solved
I manage to add duplicate in the form but I want to save the value in the field which I use to duplicate as a reference
for example I use old batch number to duplicate data so I want to save this batch to this form in order to review later that which record(Batch Number) was used to duplicate the data
Hi, just to confirm your requirement:
Do you mean that you select a template at the top, then the content of that template is loaded and filled into the form below? And when submitting, you want to generate a new batch number for this form, while also keeping a reference to the original template’s batch number?
If that’s the case, one possible solution would be to add a field like copied_from_batch
to the data table, and assign the current template’s batch number to it during form submission.
@shleyZ yes I created the field Batch_Reference but I couldn’t find how we can assign the templates batch number
You can assign the template’s batch number using the “Assign values” option on the submit button.
@shleyZ Yes I tried this but couldn’t find the template data in it
this is template batch number
but when I go to assign value > Current form > I couldn’t find the data template to get value of data template and paste it in the copied_from_batch
Any update?
How did you implement the template selection?
Would it be possible to display the selected batch number directly in the form below?
If so, it might be easier to access it during submission using the “Assign field values” action.
We use a form called “Formulations” to enter formulation data. Previously, our team faced inefficiencies because they had to manually input values every time.
To streamline this, we implemented Form Data Templates to duplicate existing data:
Screenshot: The template used for duplicating data.
Screenshot: How the duplication process works.
Issue:
While the duplication functionality works well, there’s no way to trace which original record the duplicated data came from. Each duplicated entry is saved with a new batch number but lacks a reference to the source batch. As a result:
- Duplicated records aren’t linked to their originals.
- We can’t distinguish between newly created records and duplicated ones.
This gap makes it difficult to track data lineage or audit changes.
If we can’t use assign value then is there any other way to do it?
Hi, Sohail2949000
To solve this, you can add a UUID field to your table. When duplicating a record using a data template, this UUID will be copied as well, creating a link between the original and new records. Then, you can use this field in your workflow to identify and update related data accordingly.
Yes, the forms are now linked successfully. However, we currently can’t identify the linked batch number without opening the link.
Would it be possible to also display the linked batch number directly in the table view? This would make it much easier to manage records without having to open each link to check the associated batch.
Let me know your thoughts.
Could you let me know which field you’re using to establish the relation? In the table configuration, it should be possible to display all fields, including relation fields. Feel free to reproduce the issue in the demo environment so I can take a closer look at your configuration.
https://a_lz7m0mv75jl.v7.demo.nocobase.com/
sure I will make in demo and update you
I have inserted the duplicate button functionality, which is now working as expected.
The only remaining issue is the inability to track whether a record was duplicated, identify the source record it was duplicated from, or determine if it was newly added.
how we can track fi the record was duplicated and form which record it was duplicated from
Best regards,
@shleyZ any solution for this issue?
You can achieve this by adding redundant fields to your data table, and then using a workflow to update these fields when a record is duplicated.
is there option to duplicate/copy from other collection like we make order in orders collection and in invoice we can just get values from orders instead of typing all order data again?