Applies to version: 2019 and above; author: Martyna Krzyżak, Lily Adamowicz
A detailed description of the functionalities mentioned herein and their configuration can be found in the following sections of the WEBCON BPS Help:
The Choice tree form field allows dictionary data to be displayed on the form as a tree graph rather than a traditional list. This approach significantly improves readability, especially for dictionaries with multi-level hierarchies or parallel branches. It makes it easier for users to locate the data they need — particularly entries located deep within the structure. A typical example of data that benefits from tree-based presentation is a company's organizational structure.
Earlier versions of the system supported a different approach to configuring the Data source for the Choice tree form field (as described in the article Atrybut Drzewo Wyboru – prezentacja struktury AD w atrybucie). Starting with version 2019, this configuration method is no longer supported, and the following requirements now apply:
Equivalence of both configuration methods
Currently, both configuration methods — using either ParentID or paths — function in a similar way. In both cases, it is possible to display intermediate nodes on the form. The table below outlines the key configuration elements for each approach:
Configuration type |
Using ParentID |
Using paths |
---|---|---|
SQL query on Data source |
|
|
Returned data |
|
|
Form field configuration |
|
|
Tree view on the form |
|
|
Usage examples
Below are some use cases of the Choice tree form field when working with Active Directory structures. The queries shown do not use the WITH clause.
Full organizational structure
In WEBCON BPS workflows, it is often necessary to indicate the employee responsible for executing a given task—regardless of their position within the organizational hierarchy. The Choice tree form field is ideal for such scenarios, as it allows users to quickly locate specific individuals, even in very large organizations. Thanks to the mechanism that expands only the selected branch of the tree, users can easily navigate through successive levels of the hierarchy, focusing solely on the relevant part of the structure.
To display the organizational structure using the Choice tree form field, the SQL query defined in the Data source must return the following columns: ID, Value, and ParentID.
Fig. 1. Sample query returning the full organizational structure
When selecting an employee on the workflow form, the above configuration allows the structure to be displayed as a tree:
Fig. 2. Displaying query results for the full organizational structure
Structure starting from the current user ("myself and my subordinates")
In administrative workflows, it is often necessary to configure a form field that allows the selection of one of the current user's subordinates. This applies to situations where a manager submits a request not only on their own behalf but also on behalf of a team member — whether a direct or indirect subordinate (i.e., someone reporting to another manager further down the hierarchy). In such cases, the Choice tree form field offers a clear visualization of the organizational structure and makes it easy to identify the appropriate person.
Below is an example of an SQL query configured in the Data source to display the organizational structure starting from the user currently working on the form, including all their subordinates. The query uses a standard tree-building mechanism, where the root is defined as a record with no parent (i.e., NULL in the ParentID column). To limit the view to just a portion of the structure, you should set ParentID = NULL for the current user and exclude all other users without a manager. As a result, the form will display a tree structure rooted at the current user.
Fig. 3. SQL query returning the structure starting from the current user
On the form, the Choice tree will display a graph showing the current user and all of their subordinates based on this configuration:
Fig. 4. Tree view showing the current user and their subordinates
Summary
The Choice tree form field is an effective tool for displaying and selecting hierarchical data — such as a company’s organizational structure. Thanks to the ability to expand and collapse branches, users can intuitively navigate even very complex hierarchies.
This article presented two usage scenarios for the form field:
Both configuration approaches — whether based on ParentID columns or paths — now support the selection of intermediate nodes and work correctly without the use of the WITH clause. The updated approach is fully compatible with current versions of WEBCON BPS and is recommended when designing forms that rely on organizational structures.