cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
taramoe
Level: Powered On

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

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

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

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

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

Highlighted
taramoe
Level: Powered On

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

Thank you, very helpful.

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Users online (6,485)