cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

How to update a specific SharePoint list item based on a specific matching criteria that already exists in the SharePoint list.

Basically the title. I have a flow that adds information into a SharePoint list. In this specific flow I'd like to update information that is already been added to the list. I feel like I am close, but not quite there yet. Currently my flow updates every item in the list, not just the one item that matches "ESN Ticket Number". My current flow will change every item's status from new to "Updated". I only want the row that matches the ESN ticket number I'm looking for to have it's "Status" updated.

 

List example:

3.png

 

Flow part 1:

 

The condition is "is equal to" because I'm parsing the number from an email. If there is a match this sets a boolean value to true from false.

1.png

Flow part 2:

 

If the boolean value is set to true, parse through the list, and update only the "Status" of the row that has a matching "ESN Ticket Number" to "Subject Split 2".

 

I'm sure its an expression in the Update item that I am missing, but I can't figure out what it is just yet. Any help is appreciated, and will get a kudos.

2_LI.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Assuming the ESN ticket number field is a single line of text or a number why don't you just save it as a variable and then use that in an OData query to limit the Get Items to only return the rows with that ticket number.  Then update those rows.  Something like this:

image.png



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

View solution in original post

6 REPLIES 6
Highlighted
Dual Super User III
Dual Super User III

Assuming the ESN ticket number field is a single line of text or a number why don't you just save it as a variable and then use that in an OData query to limit the Get Items to only return the rows with that ticket number.  Then update those rows.  Something like this:

image.png



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

View solution in original post

Highlighted

@Pstork1 

 

I actually never used the Filter Query before. I've tried typing this a few different ways, but I keep getting a "BadRequest".

 

5.png

4.png

 

"ESN Ticket Number" is a "Single line of text" column.

Highlighted
Dual Super User III
Dual Super User III

Two things to do.

1) Check in the output of previous successful run of Get items and find out what the Internal name is for the ESN Ticket Number column.  It should be something without any spaces.

2) Put Single quotes in front of and behind the actual number you are checking against.  

 

The eq stands for equals.  That's the operator.  Here's a Bolg post that may help explain better

https://sharepains.com/2018/11/12/sharepoint-get-items-odata-filter-query/#:~:text=An%20OData%20filt...



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

I did some testing, and while your answer is technically right I used the "Filter Array" from "Data Operations" to accomplish this. Is there a performance benefit to an ODATA query?

Highlighted
Dual Super User III
Dual Super User III

The OData query takes place on the server, so it will work even if the list exceeds the data row limit.  Filter Array takes place in flow and is subject to the data row limit.  So yes, as lists get large the Odata query will have better performance.



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

Thank you for this clarification. I've implemented ODATA Filter Queries with complete success! I will surely hit these limits so thank you again!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (8,540)