I would like to correct the lambda expression to filter on thistool + " Prelim Drawings".I tried a Where but it says t.[Name] can't be ToString() I tried casting it as well (string), that ran without error but did not return the result.
Is there a trick here I've seen CAML examples that I didn't understand.
foreach (PublishedProject pubProj in projContext.Projects)
{
if (pubProj.Name == projname)
{
projContext.Load(pubProj.Tasks, ts => ts.Include(t => t["Name"], t => t["PercentWorkComplete"]));
projContext.ExecuteQuery();
foreach (PublishedTask tsk in pubProj.Tasks)
{
if (tsk.Name != null)
{
if (tsk.Name == thistool + " Prelim Drawings")
{
uxlblTool.Text = tsk.Name + " - " + tsk.PercentWorkComplete.ToString() + "% Work Complete";
}
}
}
}
}