Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
hic
Former Employee
Former Employee

One of the strengths of QlikView is its search engine. With it, you can find pieces of information in a fraction of a second and select the found field values. But how is the search defined? And where can the search be used?

Obviously, a search is defined by the search string that you enter when you search for something. But there are several different ways a search string can be interpreted. See for instance the picture below: In the normal search to the left you have a different result set from what you get in the wildcard search.

 

search h.png

 

The logic is the following:

 

  • Normal search
    The search string is matched against the beginning of every word in the field value. Normal search is used only in interactive searches.
  • Wildcard search
    If the search string contains a wild card or the search string is used in a programmatic search (e.g. in a Set Analysis expression), a wildcard search is made instead of a normal search. This means a strict, case insensitive, match between the search string and the field values, where the only way of representing unknown characters is explicit use of wild cards.
  • Numeric search
    If the search string begins with ‘<’ or ‘>’, a numeric comparison is made. E.g. ‘>=1000’. Only values that fulfill the numeric requirement will be matched.
  • Expression search
    If the search string begins with an equals sign ‘=’, an expression search is made. E.g. ‘=Sum(Sales)>1000’. Then an aggregation is made for each value in the field, and a match is found if the expression is true. This means that you can make a selection in one field based on an aggregation in another field.
  • Fuzzy search
    If the search string begins with ‘~’, a fuzzy search is made. This means that all field values are ranked according to similarity and the top one will be selected when you hit return.
  • Compound search
    Using a compound search, you can express more complicated search conditions with logical operators. Use brackets and ‘&’ or ‘|’, e.g. ‘(California|Nevada)’.

 

search num.png

 

Hence, how the search string is interpreted depends only on which characters it contains. The settings in the list box properties do not affect the evaluation. The "Default Search Mode" only affects how the initial search string is created.

 

Further, you can use the search string in a number of different places, not just in the search area in the user interface: You can also use it in Set analysis, in actions, in bookmarks, in API calls, etc.

 

In principle, you can combine any search string with any search place. There are however some anomalies and exceptions. For example, you cannot use normal search or fuzzy search in programmatic searches and you cannot use the advanced search modes in the Qlik Sense global search.

 

Type and place2.png

 

The bookmark deserves a special mention. If a search is made and the resulting selection is stored in a bookmark, the bookmark remembers the search string and not the selection. This means that if new values appear when the script is run, they may be selected by the bookmark, even though they didn’t exist when the bookmark was created.

 

HIC

 

Further reading related to this topic:

Text searches

Search - But what shall you find?

The Expression Search

63 Comments
hic
Former Employee
Former Employee

Nothing escapes you...

You are right, and this is considered a bug. It should always store the search string. When it will be fixed, I unfortunately don't know.

HIC

0 Likes
980 Views
Not applicable

Henric,

can u pls explain me the working of addmonths() with mode - I hope it is not working as expected

0 Likes
980 Views
hic
Former Employee
Former Employee

Please open this question in a thread of its own.

0 Likes
1,003 Views
Anonymous
Not applicable

Good One Henric!! It is very useful

1,003 Views
vlad_komarov
Partner - Specialist III
Partner - Specialist III

Henric,

As always - great article!

But I've noticed an issue in search objects functionality that I cannot  explain. I've posted the question on AppDev community: Handling [dash] and [single quote] by search objects‌, so could you please comment on it?

Thank you,

Vladimir

0 Likes
1,003 Views
Not applicable

very detailed explanation of search.

Thank u

0 Likes
1,003 Views
athompsonhp
Contributor III
Contributor III

The search feature is very powerful but there is a weakness that I have not been able to over come!

If you have the following in the list box:

ab

ab-23

ab-23-cd

zx

zx23

zxvf44

And you enter "ab" in the search and hit enter it will select all 3 items in the list!  I only want "ab".  If you enter "ab-23" you will get 2 items back. Again that is not what I ask for!!  QlikView seems to add a "*" after any search request.

Another example when you use "ab | zx" I would expect 2 items to be returned not 6.  Does anyone know how to get explicitly the items within the list box?

0 Likes
1,003 Views
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Andy - check out the setting "Default Search Mode" in the List Box Properties.

Under "Normal Search", the search string is automatically padded with asterisks on both ends. Under "Wildcard Search", the asterisks are still added for your convenience, but they are visible and they can be manually removed. In this mode, you should be able to get explicitly the items within the list.

cheers,

Oleg Troyansky

0 Likes
1,003 Views
Not applicable

Dear,

Can you also use a 'between'-function in the search bar?

Best regards,

0 Likes
997 Views
hic
Former Employee
Former Employee

To get a 'between' operation, you can use two numeric conditions, e.g.

     >50<=100

But there is no 'between'-operator that you can use.

HIC

997 Views