SharePoint CAML 搜索修改者

发布于 2024-08-09 02:58:29 字数 236 浏览 3 评论 0原文

在 MOSS2007 中使用以下 CAML 查询返回结果时,我应该在值中使用什么?该查询当前未返回任何结果。我已尝试使用帐户名称和列表中显示的名称,但现在可用。

<Eq><FieldRef Name='Modified_x0020_By' /><Value Type='User'>domain\someusername</Value></Eq>

What do I use in the value to return results using the following CAML query in MOSS2007? The query is currently not returning any results. I have tried using the Account Name and the name displayed in the list but to now avail.

<Eq><FieldRef Name='Modified_x0020_By' /><Value Type='User'>domain\someusername</Value></Eq>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

平定天下 2024-08-16 02:58:29

首先,我看到“修改者”列的内部名称实际上是“编辑器”。

这对我有用:

<Where><Eq><FieldRef Name='Editor'/><Value Type='Text'>LastName, FirstName</Value></Eq></Where>

First of all, I see the internal name for the "Modified By" column is actually "Editor".

This worked for me:

<Where><Eq><FieldRef Name='Editor'/><Value Type='Text'>LastName, FirstName</Value></Eq></Where>
尬尬 2024-08-16 02:58:29

这是我在任务列表上使用的查询的示例(但应该大致相同):

Query = String.Format(CultureInfo.CurrentCulture, 
 "<Where><Eq><FieldRef ID='{0}' /><Value Type='User'>{1}</Value></Eq></Where>",
 SPBuiltInFieldId.AssignedTo, 
 SPContext.Current.Web.CurrentUser.Name)

我使用字段的 id 而不是内部名称,不过......可能会对您有所帮助。

Here is an example from a query I used on the tasks list (but should be about the same):

Query = String.Format(CultureInfo.CurrentCulture, 
 "<Where><Eq><FieldRef ID='{0}' /><Value Type='User'>{1}</Value></Eq></Where>",
 SPBuiltInFieldId.AssignedTo, 
 SPContext.Current.Web.CurrentUser.Name)

I used the id of the field instead of internal name though...might help you.

黒涩兲箜 2024-08-16 02:58:29

好的,我设法通过搜索“作者”而不是“Modified_x0020_By”来完成此工作。

OK I managed to get this working by searching on "Author" rather than "Modified_x0020_By".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文