2013-08-30 41 views
0

我有一个列表/库,可以说20列(字段),而在我的REST查询中,我只想要返回2个字段,而不是全部20.我该如何完成这样的:仅返回Sharepoint 2010中REST查询中的特定字段

当前查询:

http://server/site/collection/_vti_bin/ListData.svc/MyList?$filter=Name eq 'Username' and SomeField ne null&$orderby=DateFrom desc&select=field1,field2 

但这总是返回所有20个领域。是不是$ select应该只返回我在URL中给出的字段?

回答

1

doh,我只是再次检查了网址,发现我忘记了select语句中的'$'。所以它应该是:

http://server/site/collection/_vti_bin/ListData.svc/MyList?$filter=Name eq 'Username' and SomeField ne null&$orderby=DateFrom desc&$select=field1,field2 
相关问题