Multi Select

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Define Forms > Form Controls >

Multi Select

Use

The Multi Select control lets you relate multiple records of one entity (entity B) to another one (entity A). The control displays all the records found in the database for entity B, and you can select one or many and associate them with entity A. The association is in one direction: entity A will hold many records of entity B, but not the other way around. You can select each record once only.

 

To be able to create a Multi Select control, entity A and entity B must have a Multiple-Multiple relationships.

 

The Multi Select displays a drop-down list where you can select some or all the records available for entity B.

 

It also displays a search box where you can type the name of a record. As you type, Bizagi displays the records of entity B that match anywhere in the record the text you entered. For instance, if you type "wer" and record B holds a record called "Flower", it appears in the list of results.

 

Forms Components258

 

This control differs from the Association Control in the way records are related between entities and the records that are shown:

 

The Association control is bidirectional: it relates multiple records of entity A to entity B, AND multiple records of entity B to entity A.

The Multi Select is unidirectional: it relates multiple records of entity B to entity A, and not the other way around.

 

The Association control displays the records of both entities that belong exclusively to the case, and the records are the ones related.

The Multi Select control displays all records saved in the project.

 

Considerations

To use a Multi Select Control, the entities to be associated must be related using a Multiple-Multiple relationship:

oEntity A (main entity), in the image below is PlanOrchestraTour.

oEntity B (secondary entity), in the image below is WFUSER (or City).

oMultiple-Multiple relationship between Entity A and the Entity B.

We recommend using Parameter and System entities as Secondary entities (entity B). Since Bizagi displays all records available in the project, using Master entities might compromise the performance of the system.

Multi select is not supported in the table's columns

 

Forms Components259

 

 

Related to attribute types

A Multi Select control must be used with entities that have a multiple-multiple relationship.

 

Properties

The following properties are exclusive to the Multi Select control:

 

Basic tab

 

PROPERTY

DESCRIPTION

Configuration Wizard

Opens the configuration wizard for the control. In it you configure the left entity (entity A), the right entity (entity B) and any filters, if necessary.

The Process entity must be able to reach entity A via XPath to be able to navigate to it in the data binding option. To select entity B navigate through entity A using the attribute that Bizagi created by default when a Multiple-Multiple relationship is used.

 

Advanced tab

 

PROPERTY

DESCRIPTION

Sort by attribute

Enables the List to be sorted by an attribute of the entity. The list in the child entity (entity B) is sorted in ascending order based on the chosen attribute.

 

Configuration

 

PROPERTY

DESCRIPTION

Main Entity

Left XPath: XPath to the Main Entity (entity A).

Secondary Entity

Right XPath: XPath from the main entity to the collection of the  Secondary Entity (entity B).

Right display attrib: Attribute to identify the records of the Entity B.

Right additional attrib: Additional attribute to identify the records of Entity B (optional). This lets you search for this particular attribute on the search box of the control.

Right filter: Filters over the Right XPath or secondary entity (entity B) to display a smaller list of values to be available. For further information, refer to Filters.

 

Example

A music company needs to design a process (called Plan Orchestra Tour) to plan the tours for their orchestra. In this process the manager must select the musicians who will be part of the orchestra and the cities that the orchestra will visit. Due to the number of members an orchestra must have, adding each musician in a table will be cumbersome. The Multi Select control makes this an easy task by letting the manager select several musicians at once from a drop down list. This can also apply to the cities.

Each musician is represented in the WFUser entity with an associated instrument.

The M-M relationships must be created in the Data Model as follows.

 

Forms Components259

 

You can relate the tour to several musicians and cities by using the Multi Select control.

Follow these steps to configure it:

 

1. In the Forms Designer, drag and drop a Multi Select control from the Controls tab into the form.

 

Forms Components260

 

2. When the Control is dropped, a configuration window appears.

 

Forms Components261

 

Enter the configuration information:

Left XPath: Select the XPath to the main Entity. In this case the PlanOrchestraTour process.

Right XPath: Select the XPath from the main entity to the collection of the Secondary Entity that contains the records to be displayed. In this case the WFUSER collection.

Navigate through the main entity (PlanOrchestraTour). Select the collection to the WFUser that Bizagi has created by default when the M-M relationship was created.

Right display attrib: Select the attribute to display from the Secondary entity. This attribute is what end users see when they select a record. In this case we will use fullName.

Right additional attrib: Select an additional attribute to display. This lets you search for this particular attribute on the search box of the control. In this case we will use the instrument name.

Right filter: Select a filter for the Secondary entity if necessary, this way a smaller list of records will appear in the Control for the end user to choose from. In this case, we create a basic filter to display only enabled users (enabled is equal to true).

 

 

Forms Components262

 

When the configuration is finished, the control appears in the Forms Designer. If the configuration is not finished, the control will not be created and thus will not be shown.

 

Forms Components263

 

3. Go to the Work Portal to test the Control.

Select the names of users that you want to add to the tour from the WFUser entity.  In this case we can select:

 

Billy Cranston (instrument: piano).

Kimberly Hart (instrument: singer).

Trini Kwan (instrument: violin).

Forms Components264

As you can see, if the available space in the control is to small to show all the selected records it will show a Forms Components266 icon. The number displayed on the icon is the number of hidden records.

 

Forms Components265

Forms Components264

 

You can display all the hidden records by clicking the Forms Components266 icon.

 

Forms Components267

 

To delete associated records, click the Forms Components264 icon on the right of the record that you want to delete.

 

Forms Components258