Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Partner
Partner

Select in Field Action - wildcard value in Search String

Hi All,

I want to pass a value in Search String of the Select in Field Action, which is dynamic and changes frequently.

Let's say, the field name is Product and it has value is in format 'Medicine_*'. Today it can be 'Medicine_Tablet', the next day it can be 'Medicine_Capsule', some other day it can be 'Medicine_Cream'.

Each day has a unique 'Medicine_*' value.

What Function/How would be the value/function in Search String value?

Select in Field - PRODUCT

Search String - 'Medicine_*'

Tags (2)
1 Solution

Accepted Solutions
Highlighted

Re: Select in Field Action - wildcard value in Search String

This should work without the single quotes around it

Medicine_*

View solution in original post

9 Replies
Highlighted

Re: Select in Field Action - wildcard value in Search String

This should work without the single quotes around it

Medicine_*

View solution in original post

Highlighted
Partner
Partner

Re: Select in Field Action - wildcard value in Search String

stalwar1

Thank you.

I was trying some sort of functions, but didn't try this one out, though I wrote it here . This works fine now.

However, the Current Selection Box shows as Medicine_*, instead of the actual name selected.

Highlighted

Re: Select in Field Action - wildcard value in Search String

However, the Current Selection Box shows as Medicine_*, instead of the actual name selected.

Yes, that is one short coming of using Select in field actions I guess. The work around would be to create a concatenated list of all Medicine_* using set analysis and then use select in action... but then you will see something like this

(Medicine_Tablet|Medicine_Capsule|....)

Highlighted
Partner
Partner

Re: Select in Field Action - wildcard value in Search String

stalwar1

Good idea.

But that is doable only if I know all the possible value names before hand. The values (Medicine_Tablet, Medicine_Capsule, etc ) are User Input and unknown to developers.

Anyways, thanks for the suggestion.

Highlighted

Re: Select in Field Action - wildcard value in Search String

Not true... you can use something like this

='(' & Concat(DISTINCT {<PRODUCT = {"Medicine_*"}>} PRODUCT, '|') & ')'

Highlighted
Partner
Partner

Re: Select in Field Action - wildcard value in Search String

Cool. Thanks stalwar1

I will give it a try.

Highlighted
MVP
MVP

Re: Select in Field Action - wildcard value in Search String

You can also add another action, with a selection of all possible values in field PRODUCT, after your first action.

This replaces the wildcard search with the explicite selected field values in field PRODUCT in your current selections.

Highlighted

Re: Select in Field Action - wildcard value in Search String

Have never tried this and it makes so much sense. How do you come up with these hidden never heard tricks? You need to publish a hidden tricks book for all of us

Highlighted
Partner
Partner

Re: Select in Field Action - wildcard value in Search String

Good approach.

Thanks swuehl