Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I use these lines of code:

<SharePoint:ClientPeoplePicker ID="clpUser" runat="server" UseLocalSuggestionCache="True"/>

JS:

var peoplePicker = SPClientPeoplePicker.SPClientPeoplePickerDict[clientId + "_TopSpan"];
var users = peoplePicker.GetAllUserInfo();

var expressions = new Array();
for (var i = 0; i < users.length; i++) {
    expressions.push("<Eq><FieldRef Name='Absentee'></FieldRef><Value Type='User'>" + users[i].DisplayText + "</Value></Eq>");
}

var query = buidQueryFromExpressions(expressions);

My problem is for several users ClientPeoplePicker returns values that represent login (domain/username), but for the CAML query I should use display name or ID, because in my list that stores the data the user display name is used. How can I correctly configure this control? May be you know other solutions?

share|improve this question
Looks like you found an answer: sharepoint.stackexchange.com/questions/58866/… – Jussi Palo Feb 18 at 14:48
@JussiPalo, I'm thinking about my solution as workaround. I don't like it. I would like to find better solution :) – Alexander Feb 19 at 7:50
Using that hidden User Information List to get the ID has been a workaround since SP 2007 so I'm guessing it is now a solution :) – Jussi Palo Feb 19 at 13:53

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.