Filtration Rules Don't Seem To Be Effective


#1

When I add a filtration rule to only include users where Department == “Finance Department” but set the CEO as the RootID, I get an error message saying it can’t find the CEO. But if I leave the RootID and remove the Filtering, the CEO shows up.
How can I start at the top level and find all users where there department contains finance
itemData[“Department”].contains(“Finance”)
or equals “Finance Department”?
return itemData[“Department”]==“Finance Department”


#2

After further testing, it seems like the RootID has to satisfy the filtration criteria. Waiting to hear back from someone else to confirm or correct my assessment.


#3

Hello @DougPunchak,

Looks like the CEO is excluded because he/she doesn’t belong to the finance department. In this case, you would need to add a condition to the filter:

function(itemData){
  return itemData["Department"].contains("Finance") || itemData["AccountName"].contains("ROOT_ACCOUNT_NAME");
}

(“ROOT_ACCOUNT_NAME”) is needed to make sure the Root ID account with no department is not omitted.

You may add more conditions to the filtration rule like this:

|| itemData["FieldName"].contains("FieldValue") // FieldName contains"FieldValue"

or like this

return itemData["FieldName"] == "FieldValue" // FieldName equals "FieldValue"

You may find more information about Filtration in this article.

Best Regards,
Anna Dorokhova
Plumsail Taam


#4

I cannot get filtration rule to work either. A root item ID "3667" configured without filter works. However, when I need to filter where the department = "Service Project Management" I get the error - "Cannot find root item with ID "3667". Please ensure that you specified correct configuration in the configuration wizard.
If I remove the root item ID "3667" - I get this: Unable to automatically find the root item ID. Possibly you specified the filtration rule that excludes everyone who could be automatically detected as a root item. Please specify root item ID manually in the configuration wizard (Filtration step). When I use this filtration:
return itemData["Department"] == "Service - Project Management" || itemData["RootID"].contains("3667"); same message.


#5

Hello, @tbrummett

  1. Are there any intermediate links between the root and filtered elements that can be excluded by your filtration rule? Please take a screenshot of the chart and mark the element that should be the root one and those to be filtered.

  2. In the filtration rule, you can use only existing fields of the data source and there is no such a field "RootID" though you can find it in the Wizard. To configure the rule, please check available fields.


  3. So your rule should look like:
    return itemData["Department"] == "Service - Project Management" || itemData["ID"] == 3667;

  4. Make sure that there are no mistakes in the department name.

  5. Please take also a screenshot of the "Filtration" section of the Wizard.


#6

I think what I was expecting was to get Carlos and Dina on the same chart.

HelpForFiltering.docx (114.0 KB)


#7

It seems that for the chart, the department is whether "Service Division" or "Houston - Airport." To make sure, please provide me with screenshots of a "Data source settings" section of the Org Chart Configuration Wizard and of column names with at least one visible item on your source list so I could correlate values and names of item properties.


#8

HelpForFiltering2.docx (96.4 KB)


#9

Please find Pat Schiele on the list and copy his ID from the accordant column (not from the "RootID" one). Then empty the "Filtration rule" and "Root ID" fields and paste the following code in the "Filtration rule":

function(itemData){
  return itemData["Department"].contains("Service - Project Management") || itemData["ID"] == 1;
}

Replace 1 by the Pat's ID from the ID column.


#10

No go.

HelpForFiltering3.docx (93.7 KB)