Book a Demo

Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

Define & Modify Searches

Having created a new Query Builder search, you can define the actions of the search using a series of filters on the 'Query Builder' tab of the search editor. A filter is a statement instructing the search to extract objects of a certain type with a specific property having a specific value or a value within a defined range. You can have a number of filters within one search. If you have copied an existing search as a base for the new search, the tab will contain filters already. If the search is completely new, the tab will be empty.

You build up the search definition in two areas:

  • The 'Add Filters' dialog, where you can configure the filters to whatever level of precision you require
  • The 'Query Builder' tab, where you can modify the filter settings, define how specific a part of the model to search, and test the search

Access

Ribbon

Explore > Search > Model | <select search> : Edit search. > Query Builder or

Design > Element > Manage > Search Model | <select search> : Edit search. > Query Builder

Keyboard Shortcuts

Crtl+F | <select search> : Edit search. > Query Builder or

Ctrl+Alt+A | <select search> : Edit search. > Query Builder

Build a Search

Step

Action

See also

1

Click on the Add filter icon. ('Add Filter') icon to display the 'Add Filters' dialog, and select and define a set of filters.

If you already have filters in the search, you can add others of the same filter set by selecting the filter set label (such as 'Attribute') before you click on the icon. The filter items are then refined to that filter set on the 'Add Filters' dialog.

Add Filters

2

If necessary (for example, if you are modifying a copy of an existing search) remove selected filter items. Click on either the filter itself or the filter set heading and click on the Remove filter button. (Remove Filter) icon.

  • If you selected a filter item, it is immediately removed
  • If you selected the filter set heading, a prompt displays to confirm the deletion; when you click on the Yes button, all filters in the set are removed

3

If you have edited a system-provided search prior to saving it as your own search, and you have decided that the changes are not appropriate, you can 'roll back' to the original settings. Click on the Restore default (Restore Default) icon in the toolbar.

4

Click on the Search options. ('Search Options') icon to set the level of the model to search, and the interaction of the filters.

Advanced Search Options

Edit Search on Query Builder tab

On the 'Query Builder' tab, you can activate, deactivate and modify the individual filters within the search. This is especially useful for 'tweaking' the search as you test it.

Column

Action

See also

Search In

If the Search contains many filters in a number of filter sets, you can collapse the filter sets you don't want to review, and expand those you do. Click on the expansion box (Expanded expansion box. Unexpanded expansion box.) next to the filter set name, as necessary.

Click on the checkbox next to an object property to select it for inclusion in the search, or clear it and omit it from the search.

Condition

If you want to change the condition that the property value must satisfy, click twice on the field to display the drop-down list and select the new Condition.

The available options are 'Contains', 'Equal To', 'Not Equals' and 'One Of'.

Look for

In most cases, this field is initially set to <Search Term> to accept a value that the search user types into the 'Search Term' field.

If necessary, overtype the current value with one or more specific values to perform the conditional search on.

This value should match the selected filter type; for example, the value would be a date for 'DateCreated' or a text value for 'Name'.

The search term can consist of multiple values, separated by commas.

Required

Select the checkbox to indicate whether the field is mandatory - that is, whether the search results must only include elements with your search term in that field.

These examples show uses of the 'Required' checkbox in the default Simple search, which checks the 'Name', 'Alias' and 'Notes' fields of all elements:

  • If the 'Required' checkbox is not selected for any field, then if the search term is found in the 'Name', 'Alias' OR 'Notes' field for an element, that element is listed in the results
  • If the 'Required' checkbox is ticked for all fields in the search, then the search term must be found in all of those fields before the element is listed in the results; that is: 'Name' AND 'Alias' AND 'Notes'
  • If the 'Required' checkbox is ticked for some fields but not others, the search term must be found in all fields for which the checkbox is ticked, and at least one of the fields in which the checkbox is not ticked; that is: Name AND (Alias OR Notes)

These checkboxes help you to define the filters on a specific feature (such as an element, diagram or attribute). You can also set up a filter to check for a defined value in every feature included in a search (an AND filter) or in any feature included in the search (an OR filter).

Notes

  • When you have set up your search, click on the Save Search icon in the Query Builder toolbar and then the Start test. (Search in Model) icon to run the search and test it

Learn more