Filters and Summary for Behaviour Web Parts

27 January, 2015 · 1 minute to read

Filters and Summary for Behaviour Web Parts

I’ve just added support for filters and a summary for the behaviour web parts: My Achievements and My Behaviour.

Before now you could filter on dates, but not on any other value of the behaviours. Now you can filter on any column. For example you could just display events where a particular action was taken.

The Filters property is a comma separated list of filters. Where a filter is in the format:

columnName:regEx

The columnName is the name of the column. This will be the same as the display name with any spaces removed. The regEx is a regular expression, which is evaluated in a case-insensitive manner. So for some examples:

Action:^Follow      Only displays behaviour events where the action starts with Follow.

Action:^Follow,ActivityType:^Other      As previous, but the activity type must also start with missing.

So given this set of behaviour events (from the Green Abbey test database):

BehaviourPreFilter

Given the second filter above it will display as:

BehaviourWithFilter

The summary option will display a line of text underneath the table. The text is put into the Summary property and {0} will be replaced by the total points and {1} will be replaced by the number of items. The summary will be wrapped in a p tag with a class of sor-behaviourSummary.

So given the summary

{0} points from {1} events.

The web part filtered as above will give:

BehaviourWithFilterAndSummary
Richard Willis headshot

Written by Richard Willis

Managing Director / Founder

Richard started SalamanderSoft in 2007 after a successful career as a software developer. Wanting to start his own company and with experience in integrating school systems he set out to build the best integration system for schools and to exceed customer expectations. He starting out on his own, doing all the coding, support and sales until finally the growing number of customers meant he needed to start growing the team. He is still heavily involved in coding the core Integration Suite product in addition to running the company and being the first point of contact for prospective customers.

Copyright © 2020 SalamanderSoft Limited