Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top