Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Partner
Partner

Multiple 'or' selections with wild cards

Hello Everyone.

I need to make selections on a list box (via the little search icon on the caption bar) which include wild cards and 'or' conditions.

Example scenario:
I have 100's of values in my field called 'Fruit'.
I have to make and save my selection to a bookmark.
Using QV9.
I want to search for Banana* or Apple* or Orange*

How can I combine search values like these into a single command?

Thanks,
Peter.

1 Solution

Accepted Solutions
Partner
Partner

AW:Multiple 'or' selections with wild cards

Hi Joachim,

I've had it confirmed that the crash using 'Advanced Search Feature' is a known bug in QV 9.00.
I belive the first service pack is around the 9/9/9, not sure what will be included in that release.

As the feature never worked on my PC, i did'nt read that section in the manual about advanced search.
It turns out you can just type the command into the normal search box, and the advanced search command will still run (must just be the window that pops up with a bug).

I'm able to use the following command to filter what i need:

=Fruit like 'Banana*' or Fruit like 'Apple*' or Fruit like 'Orange*'

Thanks,
Peter.

8 Replies
biester
Valued Contributor

AW:Multiple 'or' selections with wild cards

Hi Peter,

try with the Advanced Search feature (it's described in the manual). I can't do it myself now because QV always crashes every time I try it. But perhaps it's working with you.

Rgds,
Joachim

Partner
Partner

AW:Multiple 'or' selections with wild cards

Hi Joachim,

I've had it confirmed that the crash using 'Advanced Search Feature' is a known bug in QV 9.00.
I belive the first service pack is around the 9/9/9, not sure what will be included in that release.

As the feature never worked on my PC, i did'nt read that section in the manual about advanced search.
It turns out you can just type the command into the normal search box, and the advanced search command will still run (must just be the window that pops up with a bug).

I'm able to use the following command to filter what i need:

=Fruit like 'Banana*' or Fruit like 'Apple*' or Fruit like 'Orange*'

Thanks,
Peter.

biester
Valued Contributor

AW:Re: AW:Multiple 'or' selections with wild cards

Well, that's great, didn't know that. So you answered your question by yourself 🙂

Rgds,
Joachim

Partner
Partner

AW:Re: AW:Multiple 'or' selections with wild cards

New problem, Exclude commands

Suppose I want todo something like this:

Exclude 'Banana*' and 'Orange*'
(Any record other than these two)

How could I do this from the search bar?
I've had a look and it seems I need to use the 'And Mode' on the list box, which i've done.
However still no joy and its really annoying me now 🙂

Peter.

biester
Valued Contributor

AW:Re: AW:Re: AW:Multiple 'or' selections with wild cards

Hi Peter,

try

=NOT (Field LIKE 'Banana*') AND NOT (Field LIKE 'Orange*')

rgds,
Joachim

Partner
Partner

AW:Re: AW:Re: AW:Multiple 'or' selections with wild cards

Final question, combined include & exclude...
How would you go about doing this:

=NOT ( (Field LIKE 'Banana*') OR (Field LIKE 'Orange*') ) "but include" ( (Field LIKE 'Bans*') or (Field LIKE 'Orgs*') )

(So I would exclude 'Banana*' and 'Orange*', and include only 'Bans*' and 'Orgs*')
I know that most of the time these two logic statements are mutually exclusive, but in my project I do need to define such as rule.

Thanks,
Peter.

biester
Valued Contributor

AW:Re: AW:Re: AW:Re: AW:Multiple 'or' selections with wild cards

Hi Peter,

try:

= NOT (Field like 'Banana*') and not (Field like 'Orange*') AND (Field like 'Orgs*' or Field like 'Bans*')

It worked in my demo.

Rgds,
Joachim

Partner
Partner

AW:Re: AW:Re: AW:Re: AW:Multiple 'or' selections with wild cards

Thanks for that Joachim!