Skip to main content

I have a Delete Item object to delete other list records, for example i want to delete the list records in the list "IMX Procurement Details" where the column "Ref Num" equal to "NTP0000257".

 

Supposed i have 2 records which the "Ref Num" are equal to "NTP0000257". but after the workflow executed, I found that it just delete 1 record in the list.

 

Anyone can help and explain please, thanks.

 

 

The setting is below:

 

216455_pastedImage_1.png

216456_pastedImage_2.png

 

 

 

My List before delete records:

216457_pastedImage_3.png

 

 

My List after delete records.

216458_pastedImage_4.png

Hi Joe,

This is because the action is 'Delete item' - item being singular. It'll find the first item that matches your 'where' configuration, delete it, then move on to whatever action is next in the workflow. The action never sees the second item because it's completed its job of deleting a single item.

One workaround could be to try using the query list action and for the config set to only return items that match the condition of ref num is equal to NTP0000257, then return the output (which is a collection variable) which in your case above would contain {"NTP0000257", "NTP0000257"}.
After this you could use the for-each loop on this collection variable and within the loop use delete item. Just remember this method will delete ALL items where the num ref is the same.

Hope this helps,

Sam 


Understood and your suggestion is working fine, Thanks Sam.


Reply