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

Using form response to update a SharePoint list?

I have a SharePoint list that can be updated using a form. One of the form fields is to enter in the primary key and then another field to update the SharePoint list. 

If there's a key match, then it should update the list. If there's not a key match, I want for an email to be sent to the form responder saying that the key they entered does not match anything on the SharePoint list. 

 

The filter query doesn't work the way I have it set up because it doesn't do anything if the query returns null. I've tried setting up the condition where if the query returns null it goes to If No, but maybe I messed up the syntax, that didn't seem to work either. 

Any help you can provide is appreciated! 

image.png

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Using form response to update a SharePoint list?

Hi @trk_0930 there are a couple of ways that you can test to see if it exists or not. I've done two videos on YouTube, the first uses Filter array, and the second uses the filter query. Have a quick look and see if they help you out:

 

Filter Array Method: https://youtu.be/YLqMiDubA7s

Filter Query Method: https://youtu.be/x6QcntAs2_0

 

I hope that helps





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

View solution in original post

4 REPLIES 4
Dual Super User
Dual Super User

Re: Using form response to update a SharePoint list?

Hey @trk_0930 

 

The flow looks right to me except where you are implementing the filter query and adding the condition as well. You just need one right? Can you run the flow with the filter query and check what is the list items that is returned? 

 

In this you can then have a condition to check the length of the returned list from Sharepoint and if that is 0, create a new item and if not then update the item. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

trk_0930
Level: Powered On

Re: Using form response to update a SharePoint list?

@yashag2255 

When I don't filter the query, it seems like the apply to each is testing the condition for each item in SharePoint.

For example, if I had four items in the SP list, and one matches from the form, then it'll update the item where the key matches but still send three emails saying how the title doesn't match. Do you know any way to get around that?

Super User
Super User

Re: Using form response to update a SharePoint list?

Hi @trk_0930 there are a couple of ways that you can test to see if it exists or not. I've done two videos on YouTube, the first uses Filter array, and the second uses the filter query. Have a quick look and see if they help you out:

 

Filter Array Method: https://youtu.be/YLqMiDubA7s

Filter Query Method: https://youtu.be/x6QcntAs2_0

 

I hope that helps





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

View solution in original post

Highlighted
trk_0930
Level: Powered On

Re: Using form response to update a SharePoint list?

@MattWeston365 these solutions worked perfectly, it was exactly what I was looking for, thank you!

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

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

Power Platform World Tour

Find out where you can attend!

Users online (6,133)