Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

kashjaniqlik
New Contributor III

Passing a variable in wildmatch

Hello

I have a list of values loaded in a temp table from an excel file. I would like to pass these values to wildmatch function through a variable. Is this possible in Qlikview?

Thanks in advance.

e.g.

List of Values

ABC

DEF

GEH

I'd like to store these values in a variable and pass that variable (with a complete list) to wildmatch function.

1 Solution

Accepted Solutions

Re: Passing a variable in wildmatch

SET vList = '*ABC*','*DEF*','*GEH*';

Wlidmatch(MyField, $(vList));


talk is cheap, supply exceeds demand
6 Replies

Re: Passing a variable in wildmatch

SET vList = '*ABC*','*DEF*','*GEH*';

Wlidmatch(MyField, $(vList));


talk is cheap, supply exceeds demand
kashjaniqlik
New Contributor III

Re: Passing a variable in wildmatch

Many Thanks Gysbert. This really helpful.

Can we move the list to excel and load the values from excel in to the variable please?

Re: Passing a variable in wildmatch

Yes. Load the list from excel and use the concat function to create a list:

temp:

LOAD concat( chr(39) & MyValue & chr(39) , ',') as List FROM ...excelfile...

LET vList = peek('List',-1,'temp');

DROP TABLE temp;


talk is cheap, supply exceeds demand
kashjaniqlik
New Contributor III

Re: Passing a variable in wildmatch

Thanks again Gysbert. Almost there - although chr(39) is returning double quotes instead of single quotes and this messes my wildmatch function. any ideas please?

Re: Passing a variable in wildmatch

That's not possible. Chr(39) will return a single quote. Chr(34) returns a double quote.


talk is cheap, supply exceeds demand
Highlighted
kashjaniqlik
New Contributor III

Re: Passing a variable in wildmatch

That's fine Gysbert. I have had some issues with my excel file. Thanks for your help.

Community Browser