Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Write WildMatch from Excel File

Hello qlikers 🙂 ,

1484484.PNG

I'm loading this Excel file

 

File:
LOAD
    "Application Name",
    Backup
FROM $(vBackupFilePath)
(ooxml, embedded labels, table is Tabelle1)
    WHERE Backup = 1;

I want now all application names from the file table in my WildMatch

let vFlag2=wildmatch('$(vFilePath2)','*Reviews*, *Service*');

 I want this dynamic, for example

let vFlag2=wildmatch('$(vFilePath2)','*$(vAppname1)*, '*$(vAppname2)*,...., '*$(vAppnameN)*,);

Is there a option to get this WildMatch dynamic? 

Thank you in advance! Looking forward to reading some answers. 🙂

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

https://community.qlik.com/t5/QlikView-App-Development/Dynamic-Wildmatch-expression/td-p/493726

@Clever_Anjos  wrote:

Patterns:

LOAD * INLINE [

    F1

    8989

    11231

    123123

    13123

    13

    43534

];

List:

LOAD

chr(39)&Concat(F1&'*',chr(39)&','&chr(39))&chr(39) as List

Resident Patterns;

LET Pattern=Peek('List');

 

 

Load

  WildMatch(yourfield,$(Pattern))

from yourqvd(qvd)

 

View solution in original post

8 Replies
sunny_talwar

Are you trying to restrict one or few tables based on the fact that Backup = 1? Why not use Where Exists in the future table which is based on your Application Name field?

Anonymous
Not applicable
Author

For example C:/Documents/Qlik/Test , C:/Documents/Qlik/Test/Reviews , ...

Anonymous
Not applicable
Author

Thank you very much!

I need something like that

Hi Steve,

 

In the end I used some of the suggestions made and the following is my code straight from the application:

 

CodeList:

LOAD concat(chr(39) & A & '*' & chr(39), ',') As ValueList

FROM

CommodityCodes.xlsx

(ooxml, no labels, table is Sheet1);

 

Let vSearch = Peek('ValueList',0,'CodeList');

 

 

and used vSearch as follows:

 

LOAD *,

  wildmatch(CommodityCode,$(vSearch)) As Match;

 

Hope this helps

Alexis



But I need the wildmatch in a variable like  let Var =wildmatch(...)

How Could I do that? 🙂 Thank you in advance!

Qlik1_User1
Specialist
Specialist

Use something like this 

var=WildMatch(Concat(ExpressionSelector, ';'), '*Plan*')

sunny_talwar

Can' you use something like this

File:
LOAD "Application Name",
     Backup
FROM $(vBackupFilePath)
(ooxml, embedded labels, table is Tabelle1)
WHERE Backup = 1;

and then this

LOAD *,
     If(Exists([Application Name], CommodityCode), -1, 0) as Match;

 

Anonymous
Not applicable
Author

Thank you in advance! For your help.

Later there is an if instructions.

LET vFlag2 = wildmatch('$(vFilePath2)','*App 1*', '*App 2*',...,'*App N*');
if  '$(vFlag2)'= 1 then
...
End if

How could I integrate your code? 🙂

LOAD *,
     If(Exists([Application Name], CommodityCode), -1, 0) as Match;

 Thank you in advance! Looking forward to hearing some answers! 

Anonymous
Not applicable
Author

https://community.qlik.com/t5/QlikView-App-Development/Dynamic-Wildmatch-expression/td-p/493726

@Clever_Anjos  wrote:

Patterns:

LOAD * INLINE [

    F1

    8989

    11231

    123123

    13123

    13

    43534

];

List:

LOAD

chr(39)&Concat(F1&'*',chr(39)&','&chr(39))&chr(39) as List

Resident Patterns;

LET Pattern=Peek('List');

 

 

Load

  WildMatch(yourfield,$(Pattern))

from yourqvd(qvd)