Show logged-in user's chart on page load using SP List

by sandippatil » Wed Jan 14, 2015 2:49 pm

Hi,

On my SharePoint On-Premises Enterprise farm, i have an Employee list having 20,000 records in it . I am going to configure Org Chart using this SharePoint list. See list schema as follows,

emp-data.jpg
emp-data.jpg (25.82 KiB) Viewed 3531 times


My first requirement is, when page loads, logged-in user should see his chart first and then second, he can search other employee from the search box and get selected user's chart.

Problem here is with first requirement, in documentation, you have mentioned only user profile has ability to set logged-in user in setting Root ID in Filtration step. Logged-in user's EmployeeId is present in the User profiles so how to get logged-in user's EmployeeId and set it as Root Id.
sandippatil
 
Posts: 3
Joined: Wed Jan 14, 2015 2:05 pm

by Anton Khritonenkov » Wed Jan 14, 2015 2:58 pm

Hi,

Thank you for your question.

Drilling down to current employee when a page is opened is not supported for now.

Currently we are working on new version of Org Chart which will have extended JavaScript framework. You will be able to use it to drill down to specific employee. Thus, you will be able to get current employee on web part rendering.

The new version for SharePoint 2013 will be available within two weeks.
User avatar
Anton Khritonenkov
 
Posts: 212
Joined: Wed Nov 12, 2014 1:33 pm

by sandippatil » Thu Jan 15, 2015 9:22 am

Thanks Anton,

One more thing i have observed here, i had set fix EmployeeId i.e-18752 as Root ID in Filtration step. Then chart is gendered for that EmployeeId but after this when i tried to search in search text box then search results only showing employees from the generated chart not from all records from SharePoint list.
sandippatil
 
Posts: 3
Joined: Wed Jan 14, 2015 2:05 pm

by Anton Khritonenkov » Thu Jan 15, 2015 3:45 pm

Hi,

It is correct. It is how the Org Chart works now. In future version you will be able to search for any employee from the data source.

I noticed, that you have 20000 employees in list. Please, note that we use CAML to search in list and SharePoint has restriction for CAML queries in large lists. It is 5000 items. You can extend it on farm level.
User avatar
Anton Khritonenkov
 
Posts: 212
Joined: Wed Nov 12, 2014 1:33 pm

by sandippatil » Thu Jan 15, 2015 4:10 pm

If i load whole organization's chart(only up to 3 levels) on page load without setting Root ID in Filtration step and then i used search box for searching new employee. Will search results return employees only from 3 levels or all the records?
sandippatil
 
Posts: 3
Joined: Wed Jan 14, 2015 2:05 pm

by Anton Khritonenkov » Fri Jan 16, 2015 12:51 pm

Hi,

Currently Org Chart searches within current hierarchy only. If you specified root employee, search will traverse down for subordinates of root employee only.

If you don't specify root employee it will find root employee automatically according to current user. To find root employee based on current user it traverses up by manager field. Once it finds root employee (an employee without manager) it uses it as root. In this case search will work for all subordinates of found root employee.

In both cases search will use all subordinates, not only employees currently visible on the page.

Fell free to ask additional questions. I understand that it is not always obvious to understand all logic.
User avatar
Anton Khritonenkov
 
Posts: 212
Joined: Wed Nov 12, 2014 1:33 pm

by Anton Khritonenkov » Wed Apr 29, 2015 9:00 am

Org Chart starting from version 2.0 supports search outside of current hierarchy. Thus, it is possible now to find any employee from organization if it wasn't excluded by filtration rule in the configuration wizard.
User avatar
Anton Khritonenkov
 
Posts: 212
Joined: Wed Nov 12, 2014 1:33 pm


Return to Org Chart for SharePoint 2013