Get Current Index in page list, pxListSubscript doesn't work

Hi, I am deleting a page from a page list using RemoveDeletedObjects function, and then setting value of a field in the page list using .pxListSubscript, but in the tracer i can see .pxListSubscript with wrong value in each page, it is showing the previous value (before deletion of the page).

I even tried with Param.pyForEachCount, that too didn’t work.

Any suggestion for this?

hi @soodn,

To remove a pages in page list loop the pagelist and set a value to property pyDeletedObject to true and call RemoveDeletedObjects function.

@DhanasekarC0202 Hi, yes I did that but it’s not working.

@soodn Use the IndexInPageList() and get the Index and pass the same to delete the object

@soodn Can you add a screenshot to have more understanding..

@Hitesh Jain I tried this as well, still didn’t work.
To make it work, I had to create a temporary page list and copy my page list to the temporary one, and then again copy it back from temp to the original.