cancel
Showing results for 
Search instead for 
Did you mean: 

Loop over collection to delete can only delete the first one

Former Member
0 Kudos

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".

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Dear,

I know the way what you said,but it can't remove records of object where is the collection object in the collection.

In my way,why can't loop over the collection to delete? If I change the Action of SubAction Step to Edit Action not Remove Action it can loop over the collection and edit every record, why?

Former Member
0 Kudos

Xin,

For your Subaction Target Collection, what is the full Path?

Former Member
0 Kudos

The list view of current screen,details in pics

Former Member
0 Kudos

Can you try using "Loop over Displayed Objected"  or something like that.

Stephen

Former Member
0 Kudos

Using "Loop over displayed list items" have the same behavior,just delete the first record.

Using "Loop over selected displayed list items" can't execute remove action

Former Member
0 Kudos

Is this the bug of Agentry?