使用 CAML 查询获取用户 URL [英] Get User URL using CAML Query
本文介绍了使用 CAML 查询获取用户 URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 CAML Query 将列表中的记录过滤到 DataTable 中.我的列表中有一个 SPUser 字段.
I am making use of CAML Query to filter the records from list into DataTable. I have a SPUser Field in my list.
我正在努力在 CAML 查询中获取每个用户的用户 ID.有关如何实现这一目标的任何见解?
I am endeavoring to obtain the user id of each user in CAML Query. Any insights on how to achieve this?
推荐答案
获取 SPUser.ID 的项目:
Get items for an SPUser.ID:
获取当前用户的项目:
<Where><Eq><FieldRef Name='Person' LookupId='TRUE'/<Value Type='Integer'><UserID/></Value></Eq></Where>
获取用户显示名称的项目(列表中正常显示的内容):
Get items for a user's display name (what is displayed normally in the list):
<Where><Eq><FieldRef Name='Person'/><Value Type='Text'>Lastname, Raghu</Value></Eq></哪里>
这篇关于使用 CAML 查询获取用户 URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文