Question

10
Replies
19427
Views
DilipanV105 Member since 2012 144 posts
Atos Syntel
Posted: October 10, 2016
Last activity: October 4, 2018
Closed

What is the best way to delete embedded pages in a page list(mapped to a repeating grid) on conditional basis by clicking a button on the UI ?

My requirement is to delete embedded pages in a page list when a property in those embedded pages has certain value.

I tried the below methods

1. Used For each page in, when, remove actions in a data transform, the actions were able to removed the embedded page but at the end of each iteration the deleted embedded page got regenerated with null values for all property expect for pxobjclass property, reason being the actions are executing with the embedded page as the primary page for each iteration, so at end of iteration pega is trying to find that embedded page(primary page) which got deleted since it is not there it just creates one with null values expect for pxobjclass.

2. Tried the first step in an activity using For each embedded page, when, Page-delete combination, results were same as the first step, embedded page regenerated with null values for all properties in it expect for pxobjclass property.

3. This time using data transform i copied the required(the pages which are not going to be deleted)embedded pages to a temp page list, removed the source page list from clipboard using remove action, then copied the embedded pages from the temp page list to the source page list. again the pages got regenerated, they didn't get regenerated during the execution of data transform, but just before execution of an activity Work-Cover- Add, there is a step in the tracer called "Interaction begin" before the execution of that activity(Work-Cover- Add), if i open it i see something called "Query Data"(a property may be) which has the properties of the all embedded pages (both previously deleted and omitted), properties in omitted pages are having their respective values and properties in the previously deleted pages have null values.

(The reason for execution of Work-Cover- Add activity after the DT was that The DT execution was configured in an action set followed by action named "add new work" action)

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Case Management
Moderation Team has archived post
Share this page LinkedIn