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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,147)