Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a list which contains an Employee column of a Type person or group. I have built a page which contains a people picker and nothing else.

When the user selects a user from the PeoplePicker, i want to get that user from the above list and display all the items...

Is this possible using JSOM and Sharepoint 2013 apps?

TIA.

S

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You should be able to use client side PeoplePicker (see here) that will give data of the selected user. You can use that data to query for the items on the People list.

As Client Side PeoplePicker won't return user ID; you need to do additional query to hidden User Information List to get the site collection specific user ID, see here. You should be able to use the "Key" value you get of the user from client side PeoplePicker as it maps to the "Name" column of the hidden user list.

share|improve this answer
    
Thanks Jussi...yes I am using that example and have got it working to a point. I'm totally new to JSOM so trying to learn as I go along. I get all the selected data but not sure to isolate the DisplayText or even get the accountID/UserID –  Stephen Feb 18 '13 at 14:46
    
Updated my answer above. –  Jussi Palo Feb 18 '13 at 14:57
    
Thanks Jussi, just what I needed. –  Stephen Feb 18 '13 at 15:31

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.