zoukankan      html  css  js  c++  java
  • SharePoint Rest Api Caml multiple condition query -Rest api 利用Caml多个条件查询

    $.ajax({
    		var cquery="<View><Query><Where><And><Geq><FieldRef Name='ReleasedDate' /><Value Type='DateTime'>2018-03-22</Value></Geq><Leq><FieldRef Name='ReleasedDate' /><Value Type='DateTime'>2018-03-28</Value></Leq></And></Where></Query></View>"
    
    	url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists/getbytitle('"+listName+"')/GetItems",
    			        type: "POST",
    			        headers: {
    			            "accept": "application/json;odata=verbose",
    			            "X-RequestDigest": $("#__REQUESTDIGEST").val(),
    			            "content-Type": "application/json;odata=verbose"
    			        },
    			        data: JSON.stringify({ 
    			        query : {
    			          __metadata: {
    			            type: "SP.CamlQuery" 
    			          },
    			          ViewXml: caml
    			        }
    			      }),
    			        success: function (data) {
    		        		var arr=data.d.results;
    					console.log(arr);
    			        },
    			        error: function (error) {
    			            alert(JSON.stringify(error));
    			        }
    			    });
    Rest Caml query
    

      

  • 相关阅读:
    mysql查询版本
    mysql导出bug备注
    linux查找文件
    linux 编译式安装nginx
    linux文件校验
    linux 编译式安装apache
    网络层
    数据链路层
    物理层
    servlet过滤器
  • 原文地址:https://www.cnblogs.com/Nigel/p/11237113.html
Copyright © 2011-2022 走看看