cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Delete item not working

Jump to solution

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:

My List before delete records:

My List after delete records.

Labels: (1)
Tags (2)
0 Kudos
Reply
2 Replies
Workflow Hero

Re: Delete item not working

Jump to solution

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 

Reply
Workflow Hero

Re: Delete item not working

Jump to solution

Understood and your suggestion is working fine, Thanks Sam.

0 Kudos
Reply