我有一个包含两列的 SharePoint 列表:
users (type people, multiple values allowed)
responsible_department (type string)
我想从此列表中获取当前用户在ùsers`字段中的项目。该字段可以有多个用户(允许多个用户)!
我目前能够获得当前用户:
var currentUser;
function init() {
this.clientContext = new SP.ClientContext.get_current();
this.oWeb = clientContext.get_web();
currentUser = this.oWeb.get_currentUser();
this.clientContext.load(currentUser);
this.clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
}
function onQuerySucceeded() {
console.log(currentUser.get_loginName());
}
function onQueryFailed(sender, args) {
console.log('Request failed. \nError: ' + args.get_message() + '\nStackTrace: ' + args.get_stackTrace());
}
不,我需要在列表中的 mutli user 字段中查询我当前用户属于 people 字段的所有项目。我不知道如何查询这个。
有人可以帮我吗?