Previous Topic

Book Contents

Book Index

Next Topic

Adding Search by Collection Attributes

A collection attribute can also be used in the simple search view. This way it is possible to search for objects according to a collection of other objects linked to them in a 1:N or N:1 relation.

For example, simple search can be used to search for all systems with certain system usages. To achieve this, the simple search view of 'System' must contain a combo box filled with values from the value set assigned to the relation. The presence of a value set is a mandatory condition for the ability to add this functionality to the simple search view.

To add a relation attribute to the simple search view:

  1. A value set for the relation must exist. If not, first create the value set and assign it to the desired relation.

    For example, to be able to search for 'Facilities' (i.e. 'Location - Addresses') by 'Rooms' (i.e. 'Location - Rooms'):

    • Create a value set for the 'Location - Room' object type.

      Help Image

    • Assign the value set to the 'Location - Address.Rooms' relation.

      Help Image

    A value set created in this way will be available only for use in a simple search view.

    Once the collection attribute has a value set assigned, it can be added to the simple search view.

  2. Open the simple search view in the View Customizer.
  3. Locate the relation attribute in the 'Available Attributes' list of the 'Group Layout' tab, select it and use the 'Add Attribute' button to include the attribute in the simple search view layout.
  4. In the 'Formatter/View' field, select 'Choice box' or 'List Control'. Make sure that the 'Multiple Selection Mode' check box is selected in the 'Properties' tab for the control.

    Use the 'Properties' tab to further customize the control:

    • Multiple Selection Mode

      If selected, it enables you to make multiple selections in the List Box.

    • Maximum rows

      Specify a limit on the number of items (lines) displayed in the control.

    • Filter Condition

      Define a condition to filter the items in the control.

The search view will now contain a combo box filled with values from the assigned value set. Selecting multiple values in the combo box can be used to search for all objects linked to at least one object in the selected collection.

1:N and N:1 Relation

If a 'List Control' type for the 'Address [facility]: Location - Address' attribute has been selected, the Simple Search View would list appropriate addresses in a list box. Then it is possible to search for the locations by the address (facility) in the 'Location Rooms' catalog.

You can also define the 'reverse' (1:N) view so that it would be possible to search for the address (facility) by the locations. Note that first it is necessary to have the 'opposite' Relation Object Value Set defined. Then if a 'List Control' type for the 'Rooms [locations]: Collection of Location - Room' attribute has been selected for the View definition, you can easily find the required facility with the specified location using the 'Search' function in the Simple Search View.

See Also

Creating a Simple Search View

Assigning a Simple Search View to a Catalog