I would like getting a specific item from a specific list but i don't have ID, just a field (column) value.
Here's my list:
On the site, i have only the name...i'd like to recover the paid leave field value.
Here's what i tried to do but...
SPWeb thisWeb = SPContext.Current.Web; SPUser currentUser = thisWeb.CurrentUser; SPQuery myQuery = new SPQuery(); myQuery.Query = "<Where><Eq><FieldRef Name='User'/>" + "<Value Type='Text'>"+ currentUser.Name +"</Value></Eq></Where>"; SPListItemCollection _items = thisWeb.Lists["Sumarry"].GetItems(myQuery);