cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Preventing SharePoint item duplication when using across 2 fields

I have an app that links to several SharePoint lists.  The user chooses items from the SharePoint CheckList, stores them in a collection called "AuditInfoComposite".  When the "Run Flow" button is pressed a Flow Flow is activated that sends the collection to Flow via JSON.

 
 
 
 
 
 

form1form1

The Flow is intended to Get the Items from AuditFindings List and check that there are no duplicated between the combined fileds of AudiID and ClauseID.

 

If there are no duplicates then Create new Items 

Flow.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

View 2 of Flow

FlowB.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I have spent weeks unsuccessfully researching this forum and the Web for solutions. Could someone please assist me with this flow or a simple method to eliminate duplicates across 2 columns in SharePoint.  Barry

1 ACCEPTED SOLUTION

Accepted Solutions
Gristy
Resident Rockstar
Resident Rockstar

Hi,

You should make a flow "When item created".

 

Get that flow to do a Get Items with a OData Query on your 2 ID fields with a AND.

 

Delete the current item if any matches are returned.

View solution in original post

3 REPLIES 3
Gristy
Resident Rockstar
Resident Rockstar

Hi,

You should make a flow "When item created".

 

Get that flow to do a Get Items with a OData Query on your 2 ID fields with a AND.

 

Delete the current item if any matches are returned.

View solution in original post

Anonymous
Not applicable

I like it thank you

Anonymous
Not applicable

Gristy,

 

I reconfigured the flow as suggested

 

But I am having trouble with the OData Filter using "AND"

My syntax:

AuditID eq AuditIDCol AND ClauseID eq ClauseIDCol

"When I run the flow it stops at "Apply To Each" and generates the following error:

The template validation failed: 'The inputs of template action 'Get_items' at line '1 and column '2127' is invalid. Action 'Apply_to_each_2' must be a parent 'foreach' scope of action 'Get_items' to be referenced by 'repeatItems' or 'items' functions."

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,181)