Hi,
Is there a way of copying / Duplicating some rows details and instead of Editing these rows, copying to new rows with some fields changed ? Something like Grid
Copy?Thanks in advance,
nserpiot
Hi,
Is there a way of copying / Duplicating some rows details and instead of Editing these rows, copying to new rows with some fields changed ? Something like Grid
Copy?Thanks in advance,
nserpiot
Currently, there is no such feature.
You may consider to use Row_CustomAction server event to select records to copy. See Server event and Client script in help file. There is example for Row_CustomAction. Follow the step and you modify the code as your case is to add new records:if ($action == “copy_records”) { // assume you have add the customaction name, copy_records
ew_Execute(“INSERT INTO (, ) SELECT , FROM WHERE = " . $row[”"]);
}Replace with your actual field name and table name and is integer.
Does this method work with v2021?I need to implement multiple row copying for one of my tables.
The table has several hundred records that need to be copied all at once with identical minor changes to each row (year field for example), the user doesn’t even need to input the change as it will be standard for all (basically previous value +1).
I can use a view of my table that’s pre-filtered to include only the records I want to copy (based on a field value), but I don’t understand what the next step is to get the the copy to actually happen.
I understand that using Row_CustomAction would allow me to select the records. In my case I would preselect them all, and allow the user to deselect any that do not need copying.
But then what? How do I actually execute the copy? Does using Row_CustomAction somehow add a save or copy_rows button?I have looked in the manual but I am unable to visualise the logical workflow that using Row_CustomAction creates
philmills wrote:
Does this method work with v2021 ?
Yes, it does. You may simply change ew_Execute to ExecuteUpdate for v2021, or change it to ExecuteStatement for v2022.philmills wrote:
How do I actually execute the copy? Does using Row_CustomAction somehow add a save or copy_rows button?
If you write your code in Page_Load and Row_CustomAction server event, then you will have a new button at the upper and/or lower of your table in List Page (assume you use ACTION_MULTIPLE).
You will also see the Checkbox control will appear at each row. After selecting the Checkbox for your desired records, then click on that button I mentioned before, and the logic you write in Row_CustomAction will be run.
Thanks for this info, I think i understand now. I’ll give it a try