Deleting web blocks dynamically

Hi Everyone,I have dynamically added the web blocks on button click. Web block is placed inside the list. Now on button click I am able to add the web block to the screen by appending the local variables to the list. I have a link on the top of each web block to delete it. But I have no idea about how to tell which position on the list needs to be deleted. Like on the click of delete button how will the action get to know the position of the web block whose delete button was pressed?


Thanks & Regards

Shivya Pant


Solution


Hi Shivya!

I have uploaded an OML that might be able to help you. There's a way to get the Position of an Item inside the List.

Kind regards,
Joseph Enriquez

Solution

Joseph Enriquez wrote:


Hi Shivya!

I have uploaded an OML that might be able to help you. There's a way to get the Position of an Item inside the List.

Kind regards,
Joseph Enriquez

Thank you for your response! Actually I am using listinsert and it seems after inserting the element in the desired position it adds an empty item to the list.
And if I am using list remove then this is making the screen to reset the values to null!! 

thanks & Regards

Shivya Pant