标签: caml

U2U Caml Query Builder不再可用?

我正在尝试下载梦幻般的U2U Caml查询生成器,但我找到的所有链接都已死,我在u2u网站上找不到任何引用.它已经结束了吗?有谁知道它仍然可用的位置?

死链接 - http://www.u2u.be/res/tools/camlquerybuilder.aspx

新链接:http://www.u2u.be/Software

sharepoint caml

11
推荐指数
3
解决办法
5万
查看次数

未正确安装一个或多个字段类型.转到列表设置页面以删除这些字段

CamlQuery query = new CamlQuery();
query.ViewXml = @"<View>"
    + "<Query>"
    + "<Where><Eq><FieldRef Name='Name' /><Value Type='Text'>"
    + fileName
    + "</Value>"
    + "</Eq>"
    + "</Where>"
    + "</Query>"
    + "</View>";
ListItemCollection item = list.GetItems(query);
clientContext.Load(item);
clientContext.ExecuteQuery();
Run Code Online (Sandbox Code Playgroud)

此查询给了我错误一个或多个字段类型未正确安装.转到列表设置页面以删除这些字段.

如果我用<Where><Eq><FieldRef Name='Title' /><Value Type='Text'>而不是Name,那就没关系.

它出什么问题了 ?列表中有名称.

提前致谢 !!!

sharepoint caml sharepoint-clientobject

10
推荐指数
2
解决办法
6万
查看次数

MAX查询使用CAML

我想选择一个具有特定列的最大值的共享点列表项.如何使用CAML查询执行此操作?

sharepoint moss caml

8
推荐指数
2
解决办法
2万
查看次数

CAML中"不包含"?

CAML中,我可以使用"Contains"元素查询SharePoint Listitems,但是没有"不包含" - 我可以使用的元素.

那么获取不包含字符串的项目的最佳方法是什么?有没有比循环每个项目更好的方法?

sharepoint listitem caml

7
推荐指数
1
解决办法
1万
查看次数

如何通过CAML查询获取特定用户创建的最新项目

我试图通过CAML查询获取特定用户创建的最新项目,但它似乎返回所有人创建的所有数据.

请帮忙.

这是我的代码:

string lifestyleQuery = @"<Where><Eq><FieldRef Name='Author' /><Value Type='Text'>" + _id + @"</Value></Eq></Where>";
Run Code Online (Sandbox Code Playgroud)

c# sharepoint caml splistitem

7
推荐指数
1
解决办法
2万
查看次数

使用客户端对象模型从SP列表中获取列表项字段值

使用客户端对象模型从SP列表中获取列表项及其属性的最佳方法是什么?

这是我正在使用的代码.

        string server = "http://localhost";
        ClientContext context = new ClientContext(server);
        Web web = context.Web;
        var spList = web.Lists.GetByTitle("Contact");
        CamlQuery query = new CamlQuery();
        var items = spList.GetItems(query);
        context.Load(items, 
            itema => itema.Include(
                item => item,
                item => item["CustomerId"]));
        context.ExecuteQuery();

        Console.WriteLine("Items");
        foreach (var item in items.ToList())
        {                              
               context.Load(item);
        }

        context.ExecuteQuery();
        foreach (var item in items)
        {
             foreach (var a in item.FieldValues)
             {
                 Console.WriteLine(a.Key + ":" + a.Value.ToString());
             }
         }
Run Code Online (Sandbox Code Playgroud)

我想删除用于在上下文中加载列表项的单个内联foreach,如果可能,在第一个执行查询本身中加载项字段值.

我尝试使用以下内容

 context.Load(items, 
            itema => itema.Include(
                item => item,
                item=> item.FieldValues,
                item …
Run Code Online (Sandbox Code Playgroud)

sharepoint caml c#-4.0

7
推荐指数
2
解决办法
6万
查看次数

CAML查询到SharePoint列表,按查找字段排序

我正在尝试通过CAML从SharePoint中提取列表,我希望按特定字段排序返回的列表.该字段是查找字段.当我将OrderBy设置为查找字段时,查询返回无序,如果我使用文本字段就可以了.

当我在编辑器中构建它时,U2U CAML查询构建器将返回有序的查询.

这是我如何构建和执行查询的代码片段:

String baseQuery = "<Query><Where><Eq><FieldRef Name='paApproved' /><Value Type='Boolean'>1</Value></Eq></Where><OrderBy><FieldRef Name='paState' Ascending='True' LookupValue='TRUE' /></OrderBy></Query>";

qStates.Query = baseQuery;

SPListItemCollection byState = web.Lists["paUpdates"].GetItems(qStates);
Run Code Online (Sandbox Code Playgroud)

其余的是一个for循环,它解析集合并显示它.如有必要,我可以发布.

这是CAML查询工具发出的SOAP调用,我使用wireshark从HTTP流中删除它.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope 
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <soap:Body>
  <GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
   <listName>paUpdates</listName>
   <query>
    <Query xmlns="">
     <Where>
      <Eq>
       <FieldRef Name="paApproved" />
       <Value Type="Boolean">1</Value>
      </Eq>
     </Where>
     <OrderBy>
      <FieldRef Name="paState" Ascending="False" />
     </OrderBy>
    </Query>
   </query>
   <viewFields>
    <ViewFields xmlns="" />
   </viewFields>
   <queryOptions>
    <QueryOptions xmlns="" />
   </queryOptions>
  </GetListItems>
 </soap:Body>
</soap:Envelope>
Run Code Online (Sandbox Code Playgroud)

无论出于何种原因,CAML查询工具都能正常工作,我的代码却没有.谁知道为什么?提前致谢.

编辑反映我实际测试的代码.我有一些代码值不正确.

c# sharepoint caml

7
推荐指数
1
解决办法
3万
查看次数

CAML"不在"查询

有没有办法在SharePoint 2010中执行"NOT IN"行为?我可以像这样轻松实现IN行为:

<Where>
   <In>
      <FieldRef Name="ID"/>
      <Values>
         <Value Type="Counter">1</Value>
         <Value Type="Counter">2</Value>
         <Value Type="Counter">3</Value>
         <Value Type="Counter">4</Value>
         <Value Type="Counter">5</Value>
      </Values>
   </In>
</Where>
Run Code Online (Sandbox Code Playgroud)

但有没有办法选择所有值不在值列举?

这是USE CASE:我有一个带有AllowMultipleValues = true的Lookup字段,我需要从LookupList获取所有项目,这些项目不包含在Lookup字段中

提前致谢!

sharepoint caml

7
推荐指数
1
解决办法
1万
查看次数

如何在CAML查询中进行双重命令?

我在visual studio c#中使用camel查询从sharepoint 2010获取列表中的项目.列表项目有两个我想在caml查询中使用的字段.一个是"Section",另一个是"Order By".查询需要以某种方式对项目进行排序.首先,它需要按Section(升序=真)对其进行排序,然后按顺序排序(升序=真)进行二次排序.

例如,结果将是这样的:

<item> <Section> <Order By>
item1  A 1
item2  A 3
item3  B 1
item4  B 2
item5  C 5
item6  C 6
Run Code Online (Sandbox Code Playgroud)

到目前为止我有这个:

        SPQuery query = new SPQuery();
        query.Query = "<Query><OrderBy><FieldRef Name='" + Root_List.Fields.GetField(SECTION_COLUMN).InternalName + "' Ascending='True'/></OrderBy></Query>";
        item_collection = Root_List.GetItems(query);
Run Code Online (Sandbox Code Playgroud)

但是如何应用二级订单?

注意:Section是一个字符串字段,order by是一个数字字段.

c# caml sharepoint-2010

7
推荐指数
2
解决办法
1万
查看次数

Ocaml 中的全局变量

我正在寻找一种在 ocaml 中定义全局变量的方法,以便我可以在程序中更改它们的值。我想要用户的全局变量是:

type state = {connected : bool ; currentUser : string};;
let currentstate = {connected = false ; currentUser = ""};;
Run Code Online (Sandbox Code Playgroud)

如何更改 connected 和 currentUser 的值并将新值保存在整个程序的同一变量 currentstae 中?

ocaml global-variables caml

7
推荐指数
1
解决办法
7255
查看次数