I have the following script that I am trying to use the results to populate a piechart. However the lookup field called CountTask is preventing the populating of the chart as it is looking for a string(numbers are in that field but in my first test I used the title field so I know that string will work)
How do I output the lookup field value of that item? Your help is greatly appreciated.
ClientContext context = newClientContext("http://*******/sites/C***C");
List lstOReq = context.Web.Lists.GetByTitle("EnhancementStatus");
CamlQuery oquery =newCamlQuery();
oquery.ViewXml ="<View><RowLimit>100</RowLimit></View>";
ListItemCollection items = lstOReq.GetItems(oquery);
context.Load(lstOReq);
context.Load(items);
context.ExecuteQuery();
DataTable otable =newDataTable();
otable.Columns.Add("Id");
otable.Columns.Add("Title");
otable.Columns.Add("CountTask");
foreach(ListItem iteminitems)
otable.Rows.Add(item.Id, item["Title"], item["CountTask"]);
AEStatus.DataSource = otable;
AEStatus.DataBind();
Thank you
IPW