AnsweredAssumed Answered

Copy items from list and create item without creating a duplicate

Question asked by rencygonzalez on Sep 8, 2016
Latest reply on Sep 9, 2016 by mmatsako

Hi!

This seems like a simple thing to do but I am running into issues.

So I have an external content type where I want to copy new items from and create items into my list.

The fields that my external content type has is an id field which is an integer column along with companycode and collectorcode.

My goal is to run a workflow that queries the items from the external content type and if these items do not exists in my list then I want the item to get created.

I've tried query BCS and it seems similar to that of Query list.

My issue is I am able to query and create items but it is also creating duplicate items.

So if it queries items and creates items with IDs:

1

2

3

And then 15 min later it my workflow queries and creates items again, then my list will have

1

2

3

1

2

3

 

This is query list action that is querying from my external content type , right now I am just querying one column , once I get the ids to populate correctly then I can work on the other columns:

And this is the next action ForEach

 

I am not sure what should go after the ForEach to prevent duplicates from being created in my list?

Outcomes