The SORTBY filter offers a powerful way to dynamically organize data based on specified criteria. Whether managing tasks, tracking milestones, or prioritizing activities, this feature provides flexibility and efficiency by automatically sorting your data according to one or more attributes.
This article will explain the steps on how to build the a template using and examples on how the data will be returned.
The binding element for SORTBY
You can use the SORTBY filter on Actions, Decisions, Impacts, Schedule Tasks, Benefits & Ongoing Costs, Sub-projects and Incoming & Outgoing Dependencies by using the following binding element: [SORTBY]
SORTBY Rules
Rules to consider when filtering using SORTBY:
- If there is no order specified, the filter will return all items in ascending order. Example, if the filter is only specified as [SORTBY]
- If the order should be classified as either Ascending/Descending, there should be a space in between the element name and order by filter (Asc/Desc). Example, [SORTBY(Activity.Name Desc,Title Asc)]
How the flow of sorting is ordered by default with different items:
Item with indicated binding element | Sorting is ordered by |
Actions and Decisions (@actions) | 1) Principal Name the action belongs to, in ascending order. 2) By DueDate in ascending order. |
Impacts - Risks & Issues (@craid) | 1) By Project Name in ascending. 2) By DueDate in ascending order. |
Schedule Tasks (@schedule) | 1) By the Gantt Order in ascending order 2) By DueDate in ascending order. 3) By the Schedule Id in ascending order. |
Sub-projects (@subproject) | 1) Sub project Start Date in ascending order. 2) By Sub project End Date in descending order |
Dependencies - Outgoing & Incoming (@outgoingdep , @incomingdep) | 1) Principal Name the dependency belongs to, in ascending order. 2) By DueDate in ascending order. |
Benefits & Ongoing Costs (@qualitativebenefit, @quantitativebenefit, @qualitativecost, @quantitativecost) | There is no default sorting order. |
Build the Template
Now let's look at how to build a table that uses the SORTBY filter.
Example, you want to filter to return risks and issues that have a major or severe impact score and have them sorted by their title, you can use the following syntax: {@Craid}[^Type=Risk,Issue&&Impact=Major, Severe][SORTBY(Title)]
The first cell will contain the syntax mentioned above which is used to filter the impacts (as shown in image below) and the rest of the columns in the table include the binding elements that will be used to retrieve the impact data.
For more on the different impact binding elements, please refer to the overall How to Build Project Templates article.
The table in the template will be structured as follows:
When exported, the report will look as follows with the impacts:
Below attached is an example template that has been created to filter impacts using the SORTBY filter.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article