cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rebeccacox
Regular Visitor

Updating a Sharepoint List from a document library

Hello! 

 

I am trying to create a flow that is triggered when an item in a document library is created or modified. The flow needs to create a new item or update an existing item. Here is what I've tried: 

 

Flow.png

 

Each time I run the flow, a new item is created, and I am unable to update existing items. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Updating a Sharepoint List from a document library

 

Hi @rebeccacox ,

 

Please try the following methods to achieve your needs.

  1. Use Filter Query to filter out the eligible items in the list.
  2. Use the length() function to determine whether such items exist. If they do not exist, create new items; if they exist, update the items.

Image reference:

92.PNG93.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Updating a Sharepoint List from a document library

your condition would be failing.

Copy both sides you are comapring into compose actions and observe their output for each run through the loop. Are you sure you picked the Name from trigger and the title from get items? You probally could use a filter as well on the get items and just create a item if the length is 0 as otherwise your flow will become slower and slower the more list items you end up with

Highlighted
Community Support
Community Support

Re: Updating a Sharepoint List from a document library

 

Hi @rebeccacox ,

 

Please try the following methods to achieve your needs.

  1. Use Filter Query to filter out the eligible items in the list.
  2. Use the length() function to determine whether such items exist. If they do not exist, create new items; if they exist, update the items.

Image reference:

92.PNG93.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,078)