Use dimensions for filter groups
In this guide, we will show how you can leverage dimensions to assign properties to resources and requirements to tasks that aid in the planning process. Using Business Central dimensions, we're going to create filter groups and values, and assign them to the tasks and resources to automate the resource/task matching process 1.
In this tutorial, you will learn:
- How to create a filter group
- Link filter group values to dimensions in Business Central
- Assign dimension values as requirements/qualifications to tasks and resources
Prerequisites
This step assumes you already have set up a dimension with at least one value.
Step 1: Create filter group
Group
The first step is to create a filter group. In Business Central, hit ALT + Q
and look for the 'Dime.Scheduler Filter Groups' list. Create a new record of type 'FilterGroup' and enter a name. For this example, we'll be using 'Department' as the filter group.
Step 2: Create filter values
Sources
Once the new filter group record is made, navigate to the action bar of this list, click on the ellipsis button, hover over the 'Related' submenu, and click on the 'Sources' item. A filter group source is a reference to another table in Business Central and is used to dynamically create filter values for this group using the data from the linked table(s).
Create a new record with the following properties:
- Table No.: 349
- Field No.: 3
- Field Filter: Where(Dimension Code=FILTER(
DEPARTMENT
))
You may have to replace the value inside the filter to the right dimension code.
Table 349 is a reference to the dimension values table. Field No. 3 refers to the Name field. This record, in other words, uses the 'Department' dimension value names as the source for this group's filter values.
Filter Values
The final step of the filter group configuration is to create the initial values. In the 'Dime.Scheduler Filter Value Sources' list, select the row you just created, navigate to the actions bar and click on 'Create Filter Values'. All the values that match the criteria, i.e. all the values of the department dimension, are retrieved and will create a corresponding value in the filter values list.
To see the result, go back to the filter groups list, select the filter group, click the ellipsis button, navigate to 'Related', and click 'Filter Values'. You should see the values of the department dimension appear here as well.
Note that this step creates the initial values list. Changes to the linked tables aren't synchronized or updated by default, so you may need to rerun this step to synchronize the filter value list (and synchronize with Dime.Scheduler subsequently).
Step 3: Link the filter group to resources and tasks
Now that the filter groups are set up, it is time to use them and assign them to resources and tasks. The table that does the routing is called 'Dime.Scheduler Doc. Filter Value Sources'.
For detailed information on Dime.Scheduler Document Filter Value Sources, continue reading here.
Resource
Navigate to the 'Dime.Scheduler Doc. Filter Value Sources' table and select the line with table name 'Resource', that should already be there if you ran the Dime.Scheduler FastTrack Wizard before. Click on 'Tables' in the actions menu.
In this table, we will add two extra sources so we can hook up the Department dimension to our resources. Each subsequent record is a child of the record above.
Link To Table No. | Link to Table Name | Method |
---|---|---|
352 | Default Dimension | All |
349 | Dimension Value | Match |
When done correctly, you should have the following hierarchy:
.
├── 156 - Match - Resource
│ ├── 352 - All - Default Dimension
│ ├── 349 - Match - Dimension Value
This graph tells us that we'll navigate from the resource to the dimensions and the dimension values. In order for BC to be able to do this, we need to specify the fields, links and filters for both records. These can be configured by clicking on the corresponding button in the ribbon.
To learn about fields, links, filters, conditions, and more, continue reading here.
Default Dimension
Links
As stated in the docs, links refer to the field(s) that link the selected table with the parent table. The Table 'Default Value' is underneath table 'Resource' in the graph, so we'll need to link it to that table:
Link From | Link To | Field |
---|---|---|
1 | 2 | Resource No |
Filters
As stated in the docs, filters can be applied on the selected table to limit the number of records.
Link to | Value | Comment |
---|---|---|
1 (Table ID) | 156 | Table 156 refers to the resources table. |
3 (Dimension code) | DEPARTMENT | You may have to replace the value with the right dimension code. |
What this data set means is that the filter applies only for resources that have the 'Department' dimension. In other words, the resources with a department will not be returned in the set. After all, this is the default dimension.
Fields
No action required here as there are no fields to map.
Dimension Value
It is a similar story for the regular dimension value. We need to define links and fields. Filters are not necessary here as there is already a fallback in the form of the default dimension.
Links
As stated in the docs, links refer to the field(s) that link the selected table with the parent table. The table 'Dimension Value' is underneath table 'Default Dimension' in the graph, we'll need to link it to that table.
Link From | Link To | Field |
---|---|---|
3 | 1 | Dimension code |
4 | 2 | Dimension value code |
Filters
No action required here.
Fields
As stated in the docs, fields specify the fields that are the source of a filter value.
Filter Group | Field No |
---|---|
Department | 3 (Dimension Name) |
Task
The process is similar for tasks, although a task may originate from many different sources. Since a task can be anything, the source could be a service order, sales order, and more. From within each module, it is possible to plan on different levels. For instance, for a sales order you could plan on the sales header level or create a task for each sales lines level. Therefore, you may need to repeat this step for each table that you wish to schedule.
For this example, we'll use service items. In the 'Dime.Scheduler Doc. Filter Value Sources' table, ensure there is a line with the following specifications:
Column | Value |
---|---|
Table no | 5901 |
Table name | Service Item line |
Entity type | Task |
Resource Key Field No | 0 |
Job Key Field No | 1 |
Job Key Field Name | Document No |
Task Key Field No | 2 |
Task Key Field Name | Line No. |
If you've enabled the service module in the Dime.Scheduler FastTrack Wizard, this record should already be there.
When the record has been created, navigate to the Tables and ensure there is a line for table 5901 that applies the method 'Match' and links to the Service Item Line table. Then, select this record, click the Fields button in the ribbon and add the following record:
- Filter Group: Department
- Field No.: 0
- Fixed Value: Service
- Fixed Value Behavior: Overrule
You may have to replace the value inside the filter to the right dimension code and value.
When you send a service order to Dime.Scheduler, it will also add an extra requirement along with the order, and the filter button in the open task list will be enabled. At least one filter will be set: Department = Service
If you were to do the same for a job task (table no. 1001) and add the following field, you'd find that job tasks will have a filter for Department = Job
:
- Filter Group: Department
- Field No.: 0
- Fixed Value: Job
- Fixed Value Behavior: Overrule
Here is how it looks like for a service order line:
Step 4: Synchronize
Once the setup is done, it is time to send the groups, values, and assignments to Dime.Scheduler.
Filter Group
In Business Central, hit ALT + Q
and look for the 'Dime.Scheduler Setup' administration page. In the ribbon, click the 'Run Scheduled Synch.' button.
Resources
Send resources to Dime.Scheduler. If you use the standard 'Resources' table, then the resource data is sent when you execute 'Run Scheduled Synch' in the 'Dime.Scheduler Setup' page. Otherwise you'll need to send the resources to Dime.Scheduler according to the functionality you built yourself.
Tasks
Send tasks to Dime.Scheduler. When you send tasks to Dime.Scheduler, the setup as configured in DS Doc. Filter Value Sources is used to include the filter values for each task. You can send existing or new tasks to Dime.Scheduler. For existing tasks, this action is idempotent: filter values will be added or updated in Dime.Scheduler.
Bonus: configure user security
You can use filter groups to setup data-driven user security in Dime.Scheduler.
In Dime.Scheduler, go to > Users and select the user for which you want to apply security rule. From the pane at the bottom, locate the filter group and check values that apply for that user. From this moment, the user will only see tasks and resources of the selected departments. Planned tasks will be visible on the planning board, but the won't be able to edit or delete these.
Read more
Footnotes
-
This diagram describes the high-level data model that is covered in this guide. A group is essentially a container of related values. A department (group) can refer to sales, support, reception, accounting, etc (values). In Business Central, those values may originate from another table. This guide uses a dimension as the source for the filter values table.
This relationship is not mandatory, but it is very powerful and allows for simple master data management. In other words, with the sources table, you can reuse the information that is already available in Business Central. In the end, the sources table will generate a set of values, which is then used to assign to tasks and resources.
↩