.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Sharon Maxwell

Home >> Articles >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Articles

OData startswith Examples in SharePoint

Posted By:Jean Paul       Posted Date: April 30, 2016    Points: 200    Category: SharePoint    URL: http://www.dotnetspark.com  

In this article we will explore OData with method startswith.
 

In this article we can explore OData examples for string method startswith.

startswith

This filter returns the field values starting with specified string.

Please note that the method-name is case sensitive & only lower case works.

Example

Please create the data as shown below.

image

Following is the query URL.

http://sharepoint/_api/Web/Lists/GetByTitle('Contacts')/Items?$filter=startswith(Title,'Bran')

Following is the result using Chrome browser.

image

image

Please note that we are querying against column named Title.

Another Example

Now let us try with an non-existing string.

Following is the query URL.

http://sharepoint/_api/Web/Lists/GetByTitle('Contacts')/Items?$filter=startswith(Title,'ABCD')

Following is the result using Chrome browser which shows no-results.

image

You can now play with more examples.

image

Please note that the operation name should be in lower-case.

References

https://msdn.microsoft.com/en-us/library/gg309461.aspx

Summary

In this article we have explored OData with method startswith.


 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend