cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KrzysztofS88
Level: Powered On

Copying items between lists using filtering

Hi,

I'm trying to create a flow that will copy items from sharepoint list A to B (both lists have one column - Title), provided that the item doesn't exist in the B list yet. If it exists it should not be copied. I found a guide on how to do it, but I don't have the option 'Edit in advanced mode' in condition.

My steps:

1. When an item is created (list A)

2. Get items (list B)

Filter query: Title eq 'Title'

3. Condition - I can't 'Edit in advanced mode'. How should the condition be set? It should filter the B list, to check if the item already exists on it.

If YES - create item on B list. If NO - do nothing


I will be grateful for the tips.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Copying items between lists using filtering

@KrzysztofS88 

In the Flow below you'll find an alternative approach to your issue.

I use an OData filter in the Get items action so that it will only retrieve items if one exists where the title columns are the same. Then, I check to see if there were records returned.  Th expression that I use is in the comments area at the top of the action - I am referencing the "value" collection returned from get items from Dynamic properties.  If there were no records returned then create a new item.

Please note the single quotes before and after the reference to Title in the filter.

NoRecords.jpg

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
2 REPLIES 2
Super User
Super User

Re: Copying items between lists using filtering

@KrzysztofS88 

In the Flow below you'll find an alternative approach to your issue.

I use an OData filter in the Get items action so that it will only retrieve items if one exists where the title columns are the same. Then, I check to see if there were records returned.  Th expression that I use is in the comments area at the top of the action - I am referencing the "value" collection returned from get items from Dynamic properties.  If there were no records returned then create a new item.

Please note the single quotes before and after the reference to Title in the filter.

NoRecords.jpg

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
KrzysztofS88
Level: Powered On

Re: Copying items between lists using filtering

@ScottShearer 

It works. Thank you very much.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fourthImage

Australia Summit

Travel to Melbourne and network with thousands of peers!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 143 members 5,416 guests
Please welcome our newest community members: