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

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.

View solution in original post

2 REPLIES 2
Pstork1
Dual Super User III
Dual Super User III

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.

View solution in original post

Thank you, very helpful.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,040)