Skip to main content
Nintex Community Menu Bar

Hello!

I am trying to loop through a list and ONLY delete items based on a specified date and status. I setup a component workflow and ran a test and accidentally deleted everything in my list…. which wasn’t suppose to happen. HELP?

 

My requirements are REMOVE anything that is before:

Dec 1, 2024

AND

If the Request Status  is:

PENDING APPROVAL
REJECTED
Empty
Pending changes status
Pending Reviewer Approval

 

I used a Branch by Stage and didn’t know if that was the right approach or not..

My workflow steps are below. TIA!

 

@jpacheco 

You can put those conditions in your “Query a List” action, under the “Conditions” section. The query will only return those items. You can use the demote button to section your conditions allowing you to have both “And” and “Or” conditions
 

Please make sure you use your date and status variable. I’ve used the default sharepoint “Created” column as an example

In your delete action, you need to specify which items you want to delete using conditions. Since the query is already returning the correct items that you want to delete (because we added conditions to the query), you only need to select the Item ID property from the loop for each tab:
 

This is what your Delete Items conditions should look like

Overall this is what your workflow should look like:
 

 


@Prineel_V3 ,

 

You’re a ROCKSTAR! OMG, too, I’ve been trying to figure out how to use the AND/OR in the condition and you’ve shown me how its done! Your explanation helped me understand what needed to be done and it all worked out perfectly!

 

Thanks again!


You're Welcome :)


Reply