Duplicating Rows within Table (Pagelist)

Hi,
We have a requirement to duplicate a row within a table/repeating layout in a Constellation UI.
Our current approach involves using pyRefreshData to dynamically append to the Page List. During tracing, we can see that the Page List is successfully updated in the pyWorkPage. However, we are facing the following issues:

The updates are not being persisted to the work object.
The changes are not reflected in the UI.
When the case is reopened, the duplicated row does not appear, indicating that the data is not saved.

It seems that while the clipboard is updated transiently, the changes are not committed.
Could you please suggest any alternative or recommended approaches to reliably implement row duplication in a repeating layout in Constellation?

I would recommend to achieve the duplicate rows through Screenflow. Append the duplicate rows on first screen submit,. This should help you to persist the data between screen navigations.

What component do you have in the assignment form that displays the list? If this is an editable table, then your changes should reflect in the UI and should get submitted. In which release is this?
Updates gets persisted to the work object only on Save / Submit, not during Refresh.

pyRefreshData is useful for refreshing or reshaping transient UI data but by itself it does not guarantee persistence to the work object. If your repeating data is an Embedded Data / Page List, the more reliable approach is to create an explicit Duplicate action for the row, copy the selected row into a new page in the Page List, let the update happen through the normal Constellation edit/save flow and then refresh the view. That keeps the duplication as a real case-data update rather than only a transient UI mutation.

Option 1: Use OOTB add/edit flow with prepopulation

Option 2: Case-level action or post-processing

An embedded table isn’t really designed for additional table actions. Ideally this would be its own component. Otherwise, i was thinking like @RaviChandra said.

Auto-duplicate

You could automatically copy / duplicate previous values, if that is the more common action? Pre processing could do this. I’ve had clients where I have done this.

Duplicate button

An action would give you a “duplicate” action at least. You could even make it promoted, so its more prominent.

I tried with Configuring a combo-box to select one option from a manually added list, so that you could reference the embedded table directly as a picker. Not many know about this configuration (its a bit hidden). This at least read the client side values so you don’t have to save your table before duplicating a row.

However, I was getting errors when doing this in a local action :frowning:

So you’d probably need to build that picker yourself

On reflection, another option “duplicate” inside the action

If you add to the view of the action to add a new record, the ability to copy another row, then you could achieve this.

For me this is the best UX of the options discussed.