.NET King Logo Comments on: How to use CAML query in SharePoint Clinet Side Object Model
Skip Navigation Links
Home
Weblog
How to... (video)
Articles
About us
Contact us
0 Items in Video cart!

How to use CAML query in SharePoint Clinet Side Object Model (4/28/2016)

It has been my passion these days to work on CAML query. This passion has produced 7 videos so far. This video that I published last night shows you how to query a SharePoint list using CAML query and CSOM (Client Side Object Model).

Enjoy

By: mu2zen  
You are funny, so play is.
mu2zen https://www.oercommons.org/my
URL: https://www.oercommons.org/my  
By: Chris  
Hi Alireza;

I am having issues with executing CSOM example from videos.
I need to get the values from a Custom List, "Customers" on SPOnline site and title and description of list.


url="xxxxx.sharepoint.com/DevelopmentApp/"

My list returns top level the title and description for all the lists in site like Pictures, Customers,..
but I only want my CustomList--> Customers

var list=web.List.GetList(url);-->works to get all list in site
var list=web.List.GetByTitle("Customers")->does not work for my code

var query= new CAMLQuery();

ListItemCollection myList =list.GetItems(query);xxx


foreach(ListItem item in myList)
{

string r=string.Empty;
foreach(ListItem item in myList)
{
r+=item["Title"]+" "+item["Name"]+Environment.NewLine;

}
Console.WriteLine(r);

var result=ctx.web.Lists.Include(x=>x.Title, x.Description);
I can query and get the Title & description by traversing all list in site with if(x.Title=="Customers").

My error on ListItemCollection myList-->never initializes properly and program just exits

Customer List

Title Name
1 Joe
2 Jill
3 Jack

Thanks
Chris
URL:  
By: okaymmo  
Why don't we give this a try?
okaymmo https://about.me/okaymmo
URL: https://about.me/okaymmo  
By: u4fifa  
I let myself become a fool .
URL: http://www.prfree.org/news-fifa-17-new-leagues-may-be-added-268617.html  
By: johnoy  
how do I do this in caml,
select a,b,c,d from list where a=100??
Note that there are more columns in the list
URL:  
By: johnoy  
how do I do this in caml,
select a,b,c,d from list where a=100??
Note that there are more columns in the list
URL:  
Your name:
Email:
URL:
Comments:
 

 -