I have sharepoint 2013 list "Employee" which contents folders with the contact information of employees. There is a field which helps to identify the each employee: Employee GUID. This field has type "Text" and format (example): a3c73e48-d38e-4c83-8ed4-df70d3037cc2.
I want to use query to find employee with guid which i want. I use the code bellow:
string guid = "a3c73e48-d38e-4c83-8ed4-df70d3037cc2";
string sQuery = @"<Where><Eq><FieldRef Name=""Title""></FieldRef><Value Type=""Text"">"+guid+"</Value></Eq></Where>";
var oQuery = new SPQuery();
oQuery.Query = sQuery;
oQuery.Folder = folder;
SPListItemCollection collListItems = list.GetItems(oQuery);
And in collListItems.Count i received 0 !
But in camlQueryBuilder i receive the employee. And if i use Text field: last name + second name to identify the item i receive the collection of items with such last name + second name and there i found my employee with guid which i want.
What i do wrong? Explain me please!