Manipulating the chart with Data Rules

Manipulating the Organisation Chart using Data Rules:

The SharePoint Org Chart Web Part allows page authors to set Data Rules that change the behaviour and appearance of the organisation chart.

These rules are use Microsoft .NET regular expressions to match information in one or more columns. If a match is obtained then the rule is applied.

There are 7 different rule types available and these are

  • Exclusion Rules - items that match this rule do not appear in the org chart.
  • Exclude Blank Fields - a list of column names that will be checked and excluded if value is blank.
  • Inclusion Rules - only items that match this rule appear in the org chart.
  • Extended Line Rules - items that match this rule are drawn with extended vertical lines.
  • Exclude From Smart Draw Rules - items that match this rule are not drawn with the Smart Draw algorithm.
  • Html Format Rules - items that match this rule have additional HTML applied to them.
  • Truncate Rules - data item that match this rule are shortened. This is useful for formatting long job titles and the like.

The Data Rules

Most of the rules follow the smame format.
FieldName=RegularExpression;OptionalParameter
and are set in the Data Rules configuration section. Individual rules are separated by a , ( comma ). For example an author can specify Rule1, Rule2, Rule3
The rules below match the column Title to either CEO or Directory

Title=CEO,Title=Director


The Truncate Data Rule

The "Truncate Data" rule takes the form Column Name=Maximum Length. The rules below would limit the Title column to a maximum of 20 characters and the Full Name column to 30.
Title=20,FullName=30


Choosing a or column field name

The rules can be applied against any column or field in the data source that the organization chart is generated from. A simple way to find that list of available fields is to turn on the Debug Mode in the Trouble Shooting configuration section. The Available Fields will be shown underneath the organization chart.


Exclusion Rules.

The Exclusion Rules are used to prevent matching rows from appearing in the chart. This can be useful if certain groups of people need to be hidden from a chart.
In this example the page author creates a rule to exclude User 40 from the original chart.

This is done by entering AccountName=User40 into the Exclusion Rules box.
Once the rule is applied User 40 is no longer visible.                        


Inclusion Rules

The Inclusion Rules are the opposite of the Exclusion rules. That is ONLY items that match the rules are included in the organization chart.

These rules should be used carefully as it is easy to accidently exclude all or most of an organization!


Extending the chart lines

The Extended Line Rules allow the page author to extend the vertical lines of individual boxes the organisation chart. This rules follow the same format as the previous examples with the addition of an optional parameter that specifies the length in pixels of the line extension. 

In this example the rule AccountName=User33 is used to extend User33 by the default length.
To extend the line by 200 pixels the rule required is : AccountName=User33;200.


Extending Multiple Lines

By Entering the rules :

 AccountName=User31;75,AccountName=User32;125,AccountName=User33;175 

the page author has extended the lines of three of the users.


Html Format Rules

The Html Format Rules allow custom HTML to used. 
The HTML is passed as the optional parameter and must contain {0}. This is the position where value of the item being matched is substituted into the HTML. For example the rule FullName=Test;<b>{0}</b> would display the "FullName" field in bold if it's value matched "Test".
In the example in the image the rule:
 

 Title=Intern;<div style='color:red'> <b>{0}</b></div> 

Has been used to set the job titles of the interns to red.


Excluding Blank Fields

The Exclude Blank Fields rule will test a field within the data source and if the value is empty the person will be excluded from the chart.  

For example the rule

JobTitle,HireDate

would exclude anyone from the organization chart who did not have a job title OR a hire date set.


Sorting the chart

The Sort By Column Names takes a list of fields ( for example Surname, FirstName ) and sorts the organization chart.

Sorting is not always possible with certain options enabled.  For example the Look & Feel > Smart Draw option layouts the organization chart to minimizes the space required.  This can be at odds to sorting.

To enable the chart to be sorted the Smart Draw option may need to be turned off.


How can we help?

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.

Our products

SharePointOrgChart

  • For Microsoft SharePoint
  • Download, install & configure
  • $750
 

TeamOrgChart

  • For Office 365 and Microsoft Azure
  • Online, interactive service based application
  • $100 +
 

OrgChartComponent

  • For ASP.NET websites and applications
  • Versatile & feature rich
  • $200 +
 

website design & build blooberrydesign.co.uk