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.
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?
function(itemData, context){
var jobTitleFiled = "Title";
return context.itemType == "Credentials Administrator" || context.itemType == "Item" && !itemData[jobTitleFiled].toLocaleLowerCase().contains("Credentials Administrator")
}