Specific instance deletion in flex repeater

Hi team ,
I'm trying to delete a specific instance from a Flex Repeater, but even when I pass the index, it's deleting the last instance instead. Kindly help me in deleting the specific instance

post your code, formated.

But you should probably just generate all the instances through a binding, instead of deleting one from an list.

2 Likes

Maybe you could use the pop() method in Jython

Rebuild the list of instances, minus the one you want to remove.

1 Like

Hi ,
I have called this through message handler , and deleting the specific index

	index = payload['index']
	flex = self.props.instances
	flex.pop(int(index))

And ...?
Does it work? If it does then mark your own answer or Alexi's as "Solution",

1 Like

I agree with @victordcq that it's generally better to build the list programmatically if the list is going to change.

You can select the base node of the flex repeater and copy and then paste into a text editor to see the json it's using. Then you can build that off a binding and a script transform.

1 Like