Get User URL using CAML Query

百般思念 提交于 2019-12-24 21:34:51

问题


I am making use of CAML Query to filter the records from list into DataTable. I have a SPUser Field in my list.

I am endeavoring to obtain the user id of each user in CAML Query. Any insights on how to achieve this?


回答1:


Get items for an SPUser.ID:

<Where><Eq><FieldRef Name='Person' LookupId='TRUE'/><Value Type='Integer'>45</Value></Eq></Where>

Get items for the current user:

<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></Where>



来源:https://stackoverflow.com/questions/3416164/get-user-url-using-caml-query

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!