cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dlprentice
Responsive Resident
Responsive Resident

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
Pstork1
Dual Super User
Dual Super User

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
Pstork1
Dual Super User
Dual Super User

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.

@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.

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.

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?

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.

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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,899)