Hi all,

Long time no speak! :)

I'm trying to retrieve the number of list items in a specified list view
via JavaScript.

The problem is that the get_viewQuery method does not return a valid CAML
query.

What it returns is:

     <OrderBy>\
        <FieldRef Name="Modified" Ascending="FALSE" />
     </OrderBy>

     <Where>
        <Eq>
           <FieldRef Name="Author" />
           <Value Type="Integer"><UserID Type="Integer" /></Value>
        </Eq>
      </Where>

What I need is:

*<View>*
     <OrderBy>\
        <FieldRef Name="Modified" Ascending="FALSE" />
     </OrderBy>
     *<Query>*
        <Where>
          <Eq>
             <FieldRef Name="Author" />
             <Value Type="Integer"><UserID Type="Integer" /></Value>
          </Eq>
        </Where>
     *</Query>*
*</View>*

Apparently this issue also applies to C#.

The only solution I've found is to wrap the returned CAML like so:

viewQuery = String.format("*<View><Query>*{0}*</Query></View>*",
view.get_viewQuery());

But this is limited and not does not allow for OrderBy, ViewFields and
other possibilities.

Has anyone hit this before and found a viable solution?

Cheers,

Paul
_______________________________________________
Sponsored by Infotext - Amazing Search for Microsoft SharePoint - 
http://www.infotext.com/
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss

Reply via email to