SOLVED

SharePoint Get Items Filter Query returns unexpected results

%3CLINGO-SUB%20id%3D%22lingo-sub-644660%22%20slang%3D%22en-US%22%3ESharePoint%20Get%20Items%20Filter%20Query%20returns%20unexpected%20results%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-644660%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20using%20the%20Get%20Items%20Filter%20Query%20for%20a%20simple%20string%20comparison.%20However%2C%20I%20get%20zero%20results%20no%20matter%20what%2C%20even%20though%20if%20I%20run%20the%20same%20query%20in%20the%20browser%20with%20a%20REST%20url%20I%20get%20the%20results%20I%20expect.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20REST%20query%3C%2FP%3E%3CPRE%3Ehttps%3A%2F%2Fxxxxxx.sharepoint.com%2F_api%2Fweb%2Flists(guid'xxx-xxxxxx--xxxxx-xxxxx')%2Fitems%3F%24select%3DTitle%26amp%3B%24filter%3DTitle%20eq%20'String%20Value'%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20get%20the%20expected%20value%20of%201%20record%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20enter%20the%20same%20query%20in%20the%20Flow%2C%20I%20get%20a%20blank%20result%20every%20time.%20I've%20tried%20several%20string%20values%20that%20I%20know%20exist.%20I've%20tried%20trim()'ing%20the%20string.%20I've%20confirmed%20that%20my%20Flow%20connection%20account%20has%20access%20to%20the%20SharePoint%20list.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20am%20I%20not%20thinking%20of%3F%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F115955i15CA5AFEFEA535B5%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22Capture.PNG%22%20title%3D%22Capture.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-644660%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-649073%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Get%20Items%20Filter%20Query%20returns%20unexpected%20results%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-649073%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F4572%22%20target%3D%22_blank%22%3E%40Courtney%20Prothero%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20the%20%3CSTRONG%3ETitle%3C%2FSTRONG%3E%20text%20and%20%3CSTRONG%3EEmployeeText%3C%2FSTRONG%3E%20the%20same%20case%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPerhaps%20there's%20a%20mismatch%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20saying%20that%2C%20I%20use%20Filter%20Query%20as%20well%20and%20don't%20have%20the%20issue%20although%20my%20answers%20in%20the%20particular%20Flow%20are%20fixed%20so%20the%20match%20is%20guaranteed.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%3C%2FP%3E%3CP%3EDamien%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-658344%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Get%20Items%20Filter%20Query%20returns%20unexpected%20results%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-658344%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20for%20responding.%20Checking%20the%20case%20is%20a%20good%20tip.%20However%2C%20in%20this%20case%20I%20think%20it%20was%20a%20backend%20issue.%20When%20I%20came%20back%20to%20the%20office%20after%20the%20holiday%20weekend%20I%20tried%20re-running%20a%20previous%20instance%20of%20the%20flow%2C%20without%20making%20any%20changes%2C%20and%20it%20worked%20as%20expected.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20maybe%20just%20an%20undisclosed%20health%20issue%20with%20Sharepoint%20on%20Friday.%20And%20me%20feeling%20like%20I%20was%20missing%20something%20obvious.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-659478%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Get%20Items%20Filter%20Query%20returns%20unexpected%20results%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-659478%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F4572%22%20target%3D%22_blank%22%3E%40Courtney%20Prothero%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGlad%20the%20issue%20is%20resolved.%20Yeah%20sometimes%20these%20random%20things%20crop%20up%20but%20sounds%20like%20you%20are%20back%20on%20track.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENice%20work!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHave%20a%20great%20weekend%20ahead!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%20and%20best%20wishes%3C%2FP%3E%3CP%3EDamien%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

I am using the Get Items Filter Query for a simple string comparison. However, I get zero results no matter what, even though if I run the same query in the browser with a REST url I get the results I expect.

 

The REST query

https://xxxxxx.sharepoint.com/_api/web/lists(guid'xxx-xxxxxx--xxxxx-xxxxx')/items?$select=Title&$filter=Title eq 'String Value'

 

I get the expected value of 1 record

 

When I enter the same query in the Flow, I get a blank result every time. I've tried several string values that I know exist. I've tried trim()'ing the string. I've confirmed that my Flow connection account has access to the SharePoint list. 

 

What am I not thinking of?Capture.PNG

 

 

 

 

 

3 Replies
Highlighted
Best Response confirmed by Courtney Prothero (Contributor)
Solution

Hi @Courtney Prothero 

 

Is the Title text and EmployeeText the same case?

 

Perhaps there's a mismatch?

 

In saying that, I use Filter Query as well and don't have the issue although my answers in the particular Flow are fixed so the match is guaranteed.

 

Cheers

Damien

Highlighted

Thank you for responding. Checking the case is a good tip. However, in this case I think it was a backend issue. When I came back to the office after the holiday weekend I tried re-running a previous instance of the flow, without making any changes, and it worked as expected.

 

So maybe just an undisclosed health issue with Sharepoint on Friday. And me feeling like I was missing something obvious.

 

Highlighted

Hi @Courtney Prothero 

 

Glad the issue is resolved. Yeah sometimes these random things crop up but sounds like you are back on track.

 

Nice work!

 

Have a great weekend ahead!

 

Cheers and best wishes

Damien