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

View solution in original post

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

View solution in original post

KrzysztofS88
Level: Powered On

Re: Copying items between lists using filtering

@ScottShearer 

It works. Thank you very much.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (6,289)