在查找字段上使用rest API过滤共享点列表 [英] Filter sharepoint list with rest API on lookup field
问题描述
嗨
我有一个SharePoint列表如下。
<
col1 col2 col3
印度Sudha黄色
非洲Ajay绿色
美国Vijay红色
>
col1是一个查找字段。
我想使用Rest API并在col1上过滤列表,即使我提供了部分字符串,它也应该搜索记录。
我试过
https://sharepoint.com/sites/sitename/_api/web/lists/GetByTitle('listname')/ items?$ expand = lookupcolumn& $ select =标题,parentlookupcol / lookupcolumn& $ filter = substringof('US2017 - 0002',lookupcolumn)
,但没有运气。
我替换substring并使用filter = lookup / col eq'value',我能够搜索。但是eq会查找完整的字符串匹配,但不符合我的要求。
感谢您的帮助。
提前致谢
Naina
我的尝试:
我试过< pre> https://sharepoint.com/sites/sitename/_api/web/lists/GetByTitle('listname')/ items?$ expand = lookupcolumn& $ select = Title,parentlookupcol / lookupcolumn& $ filter = substringof('US2017 - 0002',lookupcolumn)
,但没有运气。
expand = lookupcolumn&
select = Title,parentlookupcol / lookupcolumn&
filter = substringof('US2017 - 0002',lookupcolumn),但没有运气。
当我替换substring并使用filter = lookup / col eq'value'时,我能够搜索但是eq会查找完整的字符串匹配,但不符合我的要求。
感谢您的帮助。
预付款
Naina
我试过的:
我试过< pre> https://sharepoint.com/sites/sitename/_api/web/列表/ GetByTitle( 'LISTNAME')/项目?
Hi
I have a SharePoint list as below.
<
col1 col2 col3 India Sudha Yellow Africa Ajay Green America Vijay Red
>
col1 is a lookup field.
I want to use Rest API and filter the list on a col1 in such a way that even if i give part of the string, it should search the record.
I tried "
https://sharepoint.com/sites/sitename/_api/web/lists/GetByTitle('listname')/items?$expand=lookupcolumn&$select=Title,parentlookupcol/lookupcolumn&$filter=substringof('US2017 - 0002',lookupcolumn)
", but no luck.
When i replace substring and use filter = lookup/col eq 'value' , i was able to search. But "eq" will look for complete string match which fails my requirement.
Appreciate your help.
Thanks in Advance
Naina
What I have tried:
I tried "<pre>https://sharepoint.com/sites/sitename/_api/web/lists/GetByTitle('listname')/items?$expand=lookupcolumn&$select=Title,parentlookupcol/lookupcolumn&$filter=substringof('US2017 - 0002',lookupcolumn)
", but no luck.
expand=lookupcolumn&
select=Title,parentlookupcol/lookupcolumn&
filter=substringof('US2017 - 0002',lookupcolumn)", but no luck.
When i replace substring and use filter = lookup/col eq 'value' , i was able to search. But "eq" will look for complete string match which fails my requirement.
Appreciate your help.
Thanks in Advance
Naina
What I have tried:
I tried "<pre>https://sharepoint.com/sites/sitename/_api/web/lists/GetByTitle('listname')/items?
这篇关于在查找字段上使用rest API过滤共享点列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!