Skip to Content
avatar image
Former Member

Loop over collection to delete can only delete the first one

Dear,

I want delete all collection by button.but in fact,only the first one was deteted when clicked "Remove All",Why?

In this pic, button "Remove All", add "SubAction1" to exec loop over collection delete

In this pic, action "Inv_DeleteSelectedEquips" is the action of button "Remove".

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Dec 22, 2014 at 02:02 PM

    The best way to clear a collection is have a transaction that points at the parent.  Then in the collection have the Collection object you are trying to clear as one of the properties and set to Auto-initialize.

    Don't forget to have an apply after the transaction.

    Add comment
    10|10000 characters needed characters exceeded