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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (10,958)