Workflow List Reconciliation


Badge +8

I am trying to bump one list against another and if one list has a line item, remove it from the other list. I am trying to ensure there are no duplicate entries. Is there a good way to do this? So far I have ran a query to one list and pull everything into a Item Id. I then have tried to run a "Run if" to lookup a field from said list to the other list. Then run a delete item action. Not quite sure if this is my best option, or if it will even work like I think. Any ideas? Thanks in advance!

Cassy Freeman


9 replies

Badge +16

Hey happy.png

how are you comparing them to check they are the same?  the title field or something else (mixture of fields)?

I think you're on the right track - get all list items into a collection and then in the for each check if current item in collection matches in other list - if it doesn't match, do nothing.  if it does match, delete it.

Badge +8

Hi Cassy! :-)

I am checking title and then due date. If these two r eon both lists, I want to delete the line item from one of them. I should also say I am using a site workflow.

What action would I use to say "if current item in collection matches in other list - if it doesn't match, do nothing.  if it does match, delete it"? I am struggling with that. The Runif is tripping me up so I am thinking this is not the right one?

Badge +8

Oh a Set a Condition action! I get it. I think.

Badge +16

ok so inside your collection you will need to query the list again for the current item in the collection to pull back title (vTextTitle) and due date (vDateDueDate).  Then query the other list to find item ID where title = vTextTitle and vDateDueDate.  save the ID returned (which may be blank if there is no match) into vIDMatchedItem.

Then instead of set a condition (which would work by the way, but we don't want to do anything if there isn't a match, so we only need one "branch") have a run if vIDMatchedItem is not null and inside that container the delete item (current item in collection).

does that make sense?

I can mock this up for you if you like.

Badge +8

Your instructions were great! Not sure if I got the delete item right. I attached my workflow. Are you able to view it? I am attaching screenshots too.

186947_pastedImage_0.png

186948_pastedImage_1.png

186949_pastedImage_2.png

186950_pastedImage_3.png

186951_pastedImage_4.png

186952_pastedImage_5.png

Badge +16

Ok couple of things

this one is wrong

image.png

you appear to be comparing ID on both but it should be the equivalent fields.

and the delete item you need to choose the ID you have on the for each action which you haven't pictured. You're trying to delete item in past due with an id of an item in the icr archive list.

sorry re screenshots I am working on my phone!

Badge +8

Thanks Cassy! I made the changes and will let you know how it goes.

Badge +16

How did it go Josh Shutts​?

Badge +8

No duplicates! So it must be working line a charm! Thanks Cassy!

Reply