As an alternative to making selections by clicking values in QlikView objects, you can make selections through text or numeric search.
Making Selections Using Search
The following section describes how to make selections using text search, and how QlikView responds to different commands. Perform the following steps:
Click on the list box caption, and type the search string. The string is not case sensitive.
The search string appears in the pop-up search box. As a result, QlikView will display all the values of the selected field that fulfill the criteria of the search string.
Press Enter or click one of the cells in the result to select that value.Tip: If you press Ctrl + Enter, all values matching the search string are added to your selections, as long as they are not already included in previous selections. Values matching the search string but already included in previous selections are excluded from any selection when pressing Ctrl + Enter. Values included in previous selections and that don't match with the search string are retained in your selection.
The search box is automatically closed when you press Enter, Esc, or when you click in the layout. You can also close the search box by clicking the x icon in the search box. The search box is sizable and will retain its size when it is opened again.
Search in Multiple List Boxes
All active list boxes will be included in the search. To search in multiple list boxes, Shift-click on their captions to make them active. It is not possible to select the resulting values by pressing Enter when searching in multiple list boxes.
If a selection has already been made, there are two ways in which a search can be interpreted:
- Search only among the optional values
- Search among all values, i.e. including the excluded values in the search
To set the search mode to work in, it is possible to either select or deselect Include Excluded Values in Search in the User Preferences dialog. This mode can also be set on certain individual sheet objects.
The simplest way of searching is text search. QlikView will search for field values matching a text string that you type.
In normal search (no wildcards are used), QlikView will look for words that begin in the same way as the search string. If the search string contains several words separated by blanks, QlikView will interpret it as several search strings and display field values that contain either of the strings.
You can use one or several wildcards in a search string. The following wildcards can be used:
|*||Zero or more characters, including blank. This wildcard is flexible and matches any character or any block of characters in a specific position.|
|?||A single character, including blank. This wildcard is useful when you suspect that a string may be misspelled, when you are unsure of the spelling, or when the string contains special characters that may be difficult to reproduce correctly.|
|^||Beginning of word within field value. This wildcard is used in conjunction with other wildcards.|
|a*||Finds all values that begin with the letter “a”, including strings with several words where the first word begins with an “a”.|
|*b||Finds all values that end with the letter “b”, including strings with several words where the last word ends with a “b”.|
|*c*||Finds all values that contain the letter “c”, including strings with several words|
Returns all values that have words that begin with “ab”.
Equivalent to a normal search for “ab”, but unlike the normal search it can be made more complex using wildcards. It can also be used in a programmatic search, such as in Set Analysis.
|r?ck||Finds all values that have four letters and start with an “r”, followed by any character, and ending with “ck”, for example, “rack”, “rick”, “rock”, and “ruck”.|
|r?? ????d||Finds all values that consist of a three-letter word beginning with an “r” and a five-letter word ending with a “d”.|
Fuzzy search is similar to standard search, with the exception that it compares and sorts all field values according to their degree of resemblance to the search string. Fuzzy search is especially useful in situations where misspelling is an issue. It can also help you find multiple values that are nearly identical to each other.
When a fuzzy search is made, a tilde-character (~) is displayed in front of the search string.
If starting a text search with a tilde-character, the text search window will open in fuzzy search mode. The search window will contain the tilde with the cursor placed after it. As you type, all values will be sorted by the degree of resemblance to the search string with the best matches at the top of the list. If you press Enter, the first value in the list will be selected.
You can make selections using numeric search as well. This is very similar to text search. The only difference is that the search string must begin with one of the following relational operators:
|>=||greater than or equal|
|<=||less than or equal|
|>900||will find all values greater than 900|
|<=900||will find all values less than or equal to 900|
|>900<1000||will find all values greater than 900 and less than 1000|
|<900>1000||will find all values less than 900 or greater than 1000|
Initial Search Mode
When starting to type text, the behavior may differ: in some cases, QlikView adds wildcards to the search string, to facilitate a wildcard search.
The preferred search mode can be set in the object properties and in User Preferences.
Search String Evaluation
After a search string has been entered or edited, QlikView evaluates which one of the above described search behaviors to select.
If the search string contains wildcard characters, a wildcard search will be made instead of normal search.
It is always possible to change the search mode simply by deleting or adding wild cards, a greater than (>) or smaller than (<) symbol in the search string.
The list box's search box contains a chevron (>>) to the right. If you click it, the search box is expanded to the right and a secondary result set is displayed next to the primary result set. This secondary list contains search matches in other fields. It is now possible to click in the secondary result set and make temporary selections. Such selections will narrow down the result in the primary result set. Once you make a selection in the secondary list, you can enter a new search string before making the selection in the primary list. Finally, when you make a selection in the primary result set, the secondary result list is closed.
For complex search expressions it is possible to use the Advanced Search dialog, which can be invoked by the keyboard shortcut Ctrl+Shift+F. If you start your text search with an equal sign (=),you may enter an advanced search expression involving search criteria for associated fields and full boolean logic. After the equal sign you can type any valid QlikView layout expression (Edit Expression Dialog). The expression will be evaluated for each field value in the search field. All values for which the search expression returns a non-zero value will be selected.
=MyField like 'A*' or MyField like '*Z'
if e.g. invoked from a list box containing the field MyField, the search would return all field values either starting with the letter A or ending with the letter Z.
if e.g. invoked from a list box containing the field Salesman, the search would return all salesmen with an associated sales value larger than their associated Budget.