cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
taramoe
Advocate II
Advocate II

SharePoint Get items filter query using endsWith, error 'Invalid Template'

I'm attaching to a SharePoint list.  I'm trying to query a data set with one column I want to query based on how the string ends.  I'm using endsWith and am getting an error that I haven't been able to resolve.  The query works fine until I add the 'endsWith' part.

The field MeetingDateTimeText is a text field.

 

The full expression is: 

endsWith(triggerBody()?['{MeetingDateTimeText}'],'4'
 
and I've also tried:
endsWith(Item()?['{MeetingDateTimeText}'],'4')

 

endsWith error 1.jpg

This is the error:

endsWith error 2.jpg

Ideas?

Thanks for your help.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

Unfortunately, SharePoint only supports a StartsWith operation and I don't think that one is available for use with Odata queries.  You'll have to filter some other way and then filter further after you get the dataset.  Queries within Flow allow more options than odata.  This article is on Odata queries in REST with SharePoint, but the concepts are the same.

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/use-odata-query-operations-in-sharepoint-...



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

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!

View solution in original post

2 REPLIES 2
Pstork1
Dual Super User
Dual Super User

Unfortunately, SharePoint only supports a StartsWith operation and I don't think that one is available for use with Odata queries.  You'll have to filter some other way and then filter further after you get the dataset.  Queries within Flow allow more options than odata.  This article is on Odata queries in REST with SharePoint, but the concepts are the same.

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/use-odata-query-operations-in-sharepoint-...



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

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!

Thank you, very helpful.

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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,835)