How to delete all records from Embedded Data

I am using Embedded Data to display data in a grid. My requirement is to delete all the uploaded data from the grid, which could contain around 200 to 500 records.

Please suggest..

If the grid is backed by an Embedded Data list, the recommended approach is to clear the underlying embedded Page List on the case in one server-side action, rather than trying to delete 200–500 rows one by one from the table UI. In Constellation, this should be implemented through a supported view/action pattern such as post-processing or refresh data transform logic.

e.g.: add a ‘Clear All’ action, invoke a Data Transform or flow action post-processing step, remove the entire embedded list property from the case page, save the case, and let the view refresh from the updated data. This is much more efficient for large volumes and avoids the common issue where rows disappear from the UI temporarily but reappear after refresh because the real source list was never cleared.

Can you tell where we can call the new "clear all " Actions..

I assume it is Constellation.

When yo want to clear this data on submit of assignment of shall it be triggered by user?

you would have to build a “clear all” yourself, as say a case wide action (make it promoted) so people can see it.

@MarcCheong This is interesting! Thanks for sharing!

In Pega Constellation, I am using an attachment property to upload an Excel file and populate a grid with the uploaded records. My requirement is to allow users to delete records from the grid after they have been loaded. This needs to be done on the same screen. How can I achieve this, and how can I save the updated list after the selected records have been removed?

@suchitad so you are doing something like is outlined in Streamlining Data Entry in Pega Constellation Applications with pxParseExcel - Knowledge Share - Pega Forums / Import Excel data to case (and show them in Constellation UI) - Knowledge Share - Pega Forums ?

Why not follow the same approach that we do in dev studio for bulk import records?

  1. Use a screenflow to import them so you can play back what is happening (before it happens)
  2. Use an action to trigger what you want to update

I’m personally not a huge fan of the UX for end users, you could do a select and select to allow them to remove/exclude items from the import (data reference).

@Marc Cheong

@Kamil_Janeczek Yes, I am using Pega Constellation 25.

I have an Excel upload feature where users can upload up to 500 records. Using the embedded data, we can perform line-level actions such as Edit and Delete.

Now I need to add a “Delete All” feature on the same screen where the grid is populated. This action should remove all records from the embedded data list at once.

Could you please let me know how to achieve this in Pega Constellation?

There is no prescribed way to do this, so you’d need to build a process around it. In my mind, you could do this two ways:

  1. Action orientated. Like the image i shared before, where it says purpose, provide an “Action” picklist. If the user selects delete all, the presses submit then you could delete them all
  2. Action orientated with selection. Building on the above option, if the user selects “delete”, then you could show a data reference referring to the embedded data?
    1. This could be multi-select (multiple records) to allow delete certain ones (or select all)
    2. You could also do this without a data reference, see this little known configuration Using an Embedded Data List as a Picklist Source (with combo-box)