Delete instance of Flex Repeater using a button script


Hello, I need help please.

I would like to delete instances of my Flex Repeater using a button. In fact when I click on the delete button, the instances must be deleted

You need to recreate or modify the props.instances object.

Tip: I think your design could benefit from some of the ideas in the RealPars Responsive HMI Design video series. The screenshot above is difficult to read.

I created Flex container and a flex Repeater.
What I would like is when I click the button on delete on flex repeater, the created instance should be deleted.

Yes, so you need to recreate the flex repeater’s props.instances without the view you want to delete.

This is my problem; I don’t know how I can create it.

How do you currently know how many motor views you need?
That value should be connected to a binding.
Your delete button should ‘tell’ that source count to reduce itself, in some way.

Or, you shouldn’t delete anything, and just have the delete button set display to False on the view in your repeater.