如何确定哪个用户在列表中添加了更多项目-SharePoint Online? [英] How to identify which user has added more items on a list - SharePoint Online?

查看:78
本文介绍了如何确定哪个用户在列表中添加了更多项目-SharePoint Online?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SharePoint Online: 

SharePoint Online: I'm trying to identify which user has added more items on a list using client side programming.
Is there anyway to identify using REST api/jquery/CSOM ?

预先感谢

干杯,
Srini K

Cheers,
Srini K

推荐答案

我们首先可以使用SPServices库获取Author字段数据,并将此值拉入JavaScript数组,然后在该数组中计数相同的值,然后找出哪个用户添加了更多项目:

We can firstly get the Author field data using SPServices library and pull this value into a JavaScript Array, then count the same value in the array, then figure out which user added more items:

以下是代码段供您参考:

Here is a code snippet for your reference:

<script type="text/javascript" src="../SiteAssets/Jquery/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="../SiteAssets/Jquery/jquery.SPServices.min.js"></script>
<script type="text/javascript">
var sArray = [];


(document).ready(function(){
(document).ready(function() {


().SPServices({ 操作:"GetListItems", 异步:错误, listName:"List1", CAMLViewFields:< ViewFields>< FieldRef Name ='作者'/></ViewFields>", completefunc:函数(xData,状态){
().SPServices({ operation: "GetListItems", async: false, listName: "List1", CAMLViewFields: "<ViewFields><FieldRef Name='Author' /></ViewFields>", completefunc: function (xData, Status) {


这篇关于如何确定哪个用户在列表中添加了更多项目-SharePoint Online?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆