cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Seuadr
Helper IV
Helper IV

Sharepoint Update Item - overwriting item instead of updating?

Hello All,

 

i've been working on a flow that will trigger when a response is submitted to a form embedded in a teams channel. the idea being that someone can choose a status from the form, and the flow will compare the form response to the sharepoint list and evaluate if an entry already exists. (in this case a full name) if it DOES exist, then i want to update the sharepoint list entry to the new form responses, if it does NOT exist, then i want to create a new sharepoint item.

 

currently the flow looks like:

Capture.PNG

this seems to mostly work - except that when it identifies an existing item, it overwrites ALL items in the list with that value (in this case a full name)

1 ACCEPTED SOLUTION

Accepted Solutions
v-alzhan-msft
Community Support
Community Support

Hi @Seuadr ,

 

Why are you get rows from the excel table?

 

If you want to check if the response exists in the sharepoint list, you shouldn't check the rows from the excel table, and you should check the items in the sharepoint list to see if the item exists.

 

The screenshot of the flow should as below:

1.png

length(body('Filter_array'))
items('Apply_to_each')?['ID']
items('Apply_to_each')?['Title']

 

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
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
v-alzhan-msft
Community Support
Community Support

Hi @Seuadr ,

 

Why are you get rows from the excel table?

 

If you want to check if the response exists in the sharepoint list, you shouldn't check the rows from the excel table, and you should check the items in the sharepoint list to see if the item exists.

 

The screenshot of the flow should as below:

1.png

length(body('Filter_array'))
items('Apply_to_each')?['ID']
items('Apply_to_each')?['Title']

 

 

Best Regards,

Alice

 

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

 

Alice,

 

thanks for the insight - i was using the excel table to get the full name, i was unable to get the unique ID of the sharepoint item if it didn't exist yet, so the condition would fail if there was NOT a sharepoint item that matched the full name field from the form response. 

 

i had not thought of using the method you outlined, i'll give that a go, thanks!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (4,128)