Skip to main content

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.

New 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).

New filter group

Create a new record with the following properties:

  • Table No.: 349
  • Field No.: 3
  • Field Filter: Where(Dimension Code=FILTER(DEPARTMENT))
tip

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.

New filter group

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.

New filter group

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

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).

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'.

tip

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.

New filter group

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 NameMethod
352Default DimensionAll
349Dimension ValueMatch

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.

tip

To learn about fields, links, filters, conditions, and more, continue reading here.

Default Dimension

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 FromLink ToField
12Resource No
Filters

As stated in the docs, filters can be applied on the selected table to limit the number of records.

Link toValueComment
1 (Table ID)156Table 156 refers to the resources table.
3 (Dimension code)DEPARTMENTYou 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.

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 FromLink ToField
31Dimension code
42Dimension 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 GroupField No
Department3 (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:

ColumnValue
Table no5901
Table nameService Item line
Entity typeTask
Resource Key Field No0
Job Key Field No1
Job Key Field NameDocument No
Task Key Field No2
Task Key Field NameLine No.

New filter group

note

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
tip

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:

New filter group

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.

New filter group

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

  1. 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.