Assistant Filtration from AD Fields for multiple Job Titles

by tvotta » Thu Mar 09, 2017 3:15 pm

I am attempting to get a filter going to pull an assitant out from the normal hierarchy and display them as directly under their manager similar to the blog post here.

https://plumsail.com/blog/2015/08/org-c ... ordinates/

I am an Infrastructure guy and I don't generally mess with JS all that often, so please forgive my ignorance here. Below is what my code currently looks like. That blog post looks like it was intended for when the data is coming from a list rather than user profiles pulled in from AD. I am guessing that it is just my field name information that is incorrect?

A separate but related issue, we also have the need to apply this filter for quite a few different job titles. Assistants in our organization are not typically just an assistant but have other duties as well, so there are at least half a dozen different job titles for assistants across the organization. Once I get the initial filter nailed down, do I just have the same one repeated adjusting for the job titles or is there some way to have one filter looking for several different titles?


Code: Select all
function(itemData, context){
 
 var jobTitleFiled = "Title";
 return context.itemType == "Credentials Administrator" || context.itemType == "Item" && !itemData[jobTitleFiled].toLocaleLowerCase().contains("Credentials Administrator")
 
}
tvotta
 
Posts: 1
Joined: Thu Mar 09, 2017 3:03 pm

by Anton Khritonenkov » Fri Mar 10, 2017 11:57 am

Hi,

Org Chart does it automatically since version 2.2.28. It checks if employee is a subordinate and assistant at the same time, it hides assistant from subordinates.

If you see assistants as subordinate instead of right under a manager, most likely they are added to data source as subordinate.

If you use SharePoint user profiles as a data source. Please open properties of a manager and ensure that Assistant property is filled.

If you use SharePoint list, ensure that you configured mapping for assistant list in org chart configuration. Mapping specifies what field from SharePoint list to use as assistant field. Then ensure that this field is filled. Then ensure that you enabled assistants in General settings step. Then ensure that this field is filled correctly in your source list.
User avatar
Anton Khritonenkov
 
Posts: 216
Joined: Wed Nov 12, 2014 1:33 pm


Return to Org Chart for SharePoint 2013