I have a repeating dynamic layout that has an include section. Each include section is an item that contains a delete icon (a trash). When I click on delete icon, it displays a modal dialog with a confirmation message and 2 buttons as "Yes" and "Cancel". When I click on "Yes", selected item should get deleted and on "Cancel" close the modal dialog without delete the item.
Currently I have this configuration:
The "trash" icon has a Local Action that displays a section with these two buttons and a confirmation message. On the "Yes" button, I configured a DeleteItem action, but when I click it the repeating layout specific item isn't deleted and nothing happens. How can I delete the specific item when clicking on "Yes" button?
I tried another solution but without success: tried to get the pxListSubscript and remove page through index (on the Local Action -> Flow Action -> Post Action), but I wasn't allowed to do this... got an error.
I'm using Pega 7.3
Can someone please help me with this?? Thanks in advance!
***Edited by Moderator: Pooja Gadige to add capability tag***
Actually, I'm trying to remove a Page, so when I click "Yes" it should remove the page and refresh the repeating dynamic layout so the Page removed is not going to be shown again, because it was removed.
The problem here is that I can't remove the Page that represents one item of the repeating dynamic layout from the list of items.
I have a Local Action that has a Flow Action called DeleteConfirmationModal. This Flow Action has a section called DeleteConfirmationModal. In the Post Action I have a data transform that should remove the Page represented by current Item that I want to delete. I have the pxListSubscript from the item, but I can't delete it.
Do you know another solution? Thanks!
Posted: 1 year ago
Posted: 18 May 2022 22:34 EDT
Chunzhi Hong (Chunzhi_Hong)
Principal System Architect
@DanielN27 You can achieve it by following the below steps.
1. On Click of Action button Configure Two actions one is "Launch Modal Dialog" and Other is "Refresh this Section/Other Section"
1. As the Local Action/Modal Dialog is running on the current row context, on Click of Yes update the current row page by adding some property pyDeleted = true ("you are tracking the Page list to Delete what objects you want".
2. On Close of Modal Dialog Refresh this section is triggered where you can configure to run the data transform where you can perform additional logic to remove the Page List properties based on the property value.