A calculated list allows you to apply further sorting and filtering to lists in ShareDo. These are then stored as Calculated Lists, which can be used within the application or in document templates.
Examples:
- I have a list of customers on a work type, and I want to have a pre-filtered list of those customers that only shows those customers who have an email address.
- I have a list of experts on a legal matter, and I want a pre-filtered list of only those experts who are cardiologists.
- I want to list all telephone calls made to a certain participant role.
- I want a list of all financial undertakings provided.
Where to Create a Calculated List
You can add a calculated list anywhere that there is an existing list in the system. Create calculated lists using the Data Composer ShareDo modeller.
- For a work type's data composer, go to Modeller > Work Types > {Your WorkType} > Data Composer.
- For ODS entities e.g. organisations, people etc., go to Modeller > Participant Types > ODS Data Composer to access the data composer.
For information on where to find and how to use the Data Composer, see the article Data Composer.
Before creating your calculated list, consider at which level you want to add it to your data model. Remember your work types are hierarchical. If you have a parent work type of Matter and want your list to apply to all its child types, you should add the calculated list at the matter level in the work type modeller. If you want it to be specialised for a specific work type - add it directly to the work type.
Creating a Calculated List
In this example, there are a number of proceedings for a matter straddling several different courts. We will create a list of only those proceedings which were held in the county court.
Step | Description | |
---|---|---|
1 |
Navigate to the work item where you wish to create a list. In this example, we will create a list that can be used on any Defendant Dispute work type.
Select Data Composer. |
![]() |
2 | Expand the work item to explore the tags and graph available. | ![]() |
3 | Navigate to the item for which you wish to create a list. We will create a list of work items that are the child of a matter. In our example, we need to open the Children graph to locate the Proceedings work item. | ![]() |
4 |
The List of Work Item Base form is presented. Select the work item against which you wish to create a list. Note the Type Path – we can create a list of a specific type of work item or also include any child type that may exist under the main work item type. In this example, we will select all types of proceedings, including closed ones.
|
![]() |
5 |
Select what date to sort the results by and in what order. This sets the default order for the list and helps determine which results to return. E.g., you may wish to limit the results to the five most recently created. Click Resolve to continue. |
![]() |
6 |
Now, we can apply an optional filter to only return a specific set of proceedings from the full list. E.g., the first or second proceeding that has been modified (according to the sort order above), or we can use a range to obtain a set number of proceedings – E.g. the first five (determined by the sort order above). If either of these options is chosen, click Resolve to apply the filter. |
![]() |
7 | Click the + symbol at the top right to create the list. |
![]() |
8 |
The calculated list screen will appear.
Give your field a meaningful Name, Display Name and Description. |
![]() |
9 |
Enter the Expression that you wish to filter the list by. This is mandatory. Where the result of the expression is true, the item is returned in the list. In our example, we will use the debugger to help us write and test the expression. See below for further details on using the debugger to write expressions.
|
![]() |
10 | When completed, save the calculated list. |
![]() |
Writing and Debugging Expressions in Calculated Lists
See Calculated Fields for further details on how to write expressions.
See Debugging Expressions for full details on how to use the expression debugger.
Step | Description | |
---|---|---|
1 |
In the calculated list, select the debugger.
|
Or
|
2 |
Use the search function to find the work item you wish to debug against. In our example, this would be a Defendant Dispute matter that contained several proceedings. |
![]() |
3 |
Use the Browse button to open the Context Browser. This presents the data tags for the work item in the calculated list (e.g. proceedings). |
![]() |
4 | For example, navigate to Work Item and use the clipboard icon to copy the Title of the Work Item. |
![]() |
5 |
Paste this into the expressions editor. The prefix workitem is not required. |
![]() |
6 |
The expression runs against every work item in the calculated list (e.g. proceeding) in turn to produce the results. Enter this expression and run it to return every proceeding. |
![]() |
7 |
Note the console shows the work items we are listing – in this case, all the child proceedings (including the closed ones) of the matter.
|
![]() |
8 | The green panel at the foot displays those work items that have met the conditions of the expression. |
![]() |
9 |
Let's amend the expression. Navigate to the tag browser and copy the Work Item > Type > Name. Then run the expression. |
![]() |
10 |
Note the results. We can use this method to obtain the data we need to create our expression. |
![]() |
11 |
Let's obtain the Court Type of each proceeding.
|
|
12 |
Copy the tag to the clipboard. Don’t close the tag browser. Add the text + ‘ ‘ + to the Expression |
![]() |
13 |
Now also copy the court type Name tag and paste it into the expression.
|
![]() |
14 |
This expression will now list all of the court type Ids followed by their names.
|
![]() |
15 |
Close the tag browser and run the expression. We can easily identify which Id relates to which court type. Now that we have this information, let's write the expression. |
![]() |
16 |
This will return a True in the green panel for each of the proceedings with a court type of 5021601 (i.e. the County Court).
|
![]() |
17 | Click Save to save the expression and return to the calculated list form. |
|
Sorting Calculated Lists
The sort order defined when a calculated list is created acts as the default sort order.
However, this default sort order can be overwritten by following these steps.
1
|
Open the calculated list and note the Sort By option at the foot of the expressions editor.
|
![]() |
2
|
Click on the + icon to present the tag browser. Hover over a tag you wish to sort the list by. |
![]() |
3
|
Finally, choose whether the selected tag is sorted in Ascending or Descending order. E.g., if ordering by an alphabetical field, such as title: |
![]() |
Using a Calculated List in Documents and Emails
Calculated lists will appear in the tag browser for the relevant context and can be used in the same way as other ShareDo lists. For information on configuring email templates, see the article Preparing a new Email Template.
In this example, we will create a table in a Word document to present a list of all the proceedings work items returned by a calculated list.
1
|
Open the Word document. Navigate to the tag browser in the Word plug-in. |
![]() |
2
|
All the tags for this context, including calculated fields and calculated lists, are presented. Navigate to the bottom of the tags list to see the calculated list section.
|
![]() |
3
|
The calculated list behaves in the same way as all ShareDo lists. Select the + symbol to insert a list. Pick either Repeating Section or Table. |
![]() |
4
|
Click inside the Repeating Section/Table. The Tag Browser will present only those tags available for the calculated list.
|
![]() |
5
|
Example: |
![]() |
6
|
Note that the calculated list only returns the details for the proceedings where the expression was met. I.e. held in a county court. Note the sort order is set to be Created Date, ascending. |
![]() |
7
|
Finally, Display Rules can also be used against the contents of calculated lists. In this example, only those proceedings where the hearing was held this year are returned. |
![]() |
Review
In this article, you learned why, where and how to create calculated lists. You saw how to use the debug tool to create expressions and how to use calculated lists in documents and emails.