简体   繁体   English

ODATA过滤器大小写敏感索引敏感

[英]ODATA Restful indexof filter case insenstive

I am using SharePoint Rest ODATA API for an jquery autocomplete field 我正在将SharePoint Rest ODATA API用于jquery自动完成字段

Relevant code is: 相关代码为:

/_vti_bin/listdata.svc/PropertyInformation$filter=indexof(Title,'Carrin') gt -1

This is a simple IndexOf filter. 这是一个简单的IndexOf过滤器。 The problem is it is case sensitive. 问题是它区分大小写。

I am just trying to do a "Contains" filter but I don't believe ODATA has a "Contains" method so I am using the indexOf. 我只是尝试做一个“包含”过滤器,但是我不相信ODATA有一个“包含”方法,所以我使用的是indexOf。

How can I do a tolower() call on indexof? 如何在indexof上进行tolower()调用? (is it even possible?) (有可能吗?)

找到了解决方案(很简单)

/_vti_bin/listdata.svc/PropertyInformation?$filter=indexof(tolower(Title),'" + request.term.toLowerCase() + "') gt -1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM