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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
loictaymont
Contributor
Contributor

Search in field with optional values possible ?

Hi,

First question out here and I hope I ask it at the right place.

I am not able to search with optional value in a field as I would do with python (REGEX : s? for example).

I understand the uses of wild cards *, ?, " but with the modifier ?, it expects something (a letter or space but something !)

For example :

I would like to be able to search in a field for "car in a garage" and "cars in a garage". To do that, I tried *car? in a garage* but it doesn't work as Qlik is looking for something + a space between "car and in". I am not interested in search like *car*in a garage* as it could integrate "car is not in a garage but there is a bike in a garage"

I know there are alternatives searchs but I would like to know if a special character could allow me to have something (letter, space, number, ...) or nothing ! May be it is a limit to QLIK search engine !

Thank you !!

Loic

Labels (3)
3 Replies
Chanty4u
MVP
MVP

Try this

LOAD

    Field

FROM

    Data.xls

WHERE

    WildMatch(Field, '*car in a garage*') OR WildMatch(Field, '*cars in a garage*');

marcus_sommer

AFAIK there is no own Qlik logic within the normal search else Qlik used on this layer the standard Windows libraries which provides just the * and ? which will behave like you described.

Within the newer Qlik cloud releases there are now some regex-features implemented, see:

Working with regular expressions | Qlik Cloud Help

Beside this there were also various bypass-logic shown here in the community mostly by outsourcing the regex-task into any other tool. I could remember to ones with vbs-functions in QlikView but there were others, too.

If you really need complex regex-stuff it doesn't makes sense to look for a workaround but if it are a few and rather simple matches you may replace these logic with the various text- and mapping-functions of Qlik and maybe also the practically approach to apply a search several times with small variances.

loictaymont
Contributor
Contributor
Author

Thank you for your help both of you.I ll have a look at those REGEX.

@Chanty4u , thanks for your quick answer however I don't want to "search" within the script but rather directly in the visualisation and in a field. My goal was to provide users with some guidelines to better search in a field (with long non-structured text).

Regards,