Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

singbittoo
Contributor

why this wildmatch is not working in file name comparision ?

below is my code:

let filepath = 'lib://faultData/*.xlsx';

For Each file in FileList(filepath)

Trace $(file);

  if WildMatch(chr(39)&$(file)&chr(39), '*Incidents*')>0 then // i want to load only those files where file name consists of Incidents

  // - its giving me error on the above wildmatch , in the error i can see inside the wildmatch the chr(39) is not getting converted to '

    Trace $(file);

Incidents:

Load

*

        From [$(file)]

        (ooxml, embedded labels, table is sheet1);

     EndIf;

Next;

1 Solution

Accepted Solutions
singbittoo
Contributor

Re: why this wildmatch is not working in file name comparision ?

it worked i just changed chr(39)&$(file)&chr(39) to '$(file)'

1 Reply
singbittoo
Contributor

Re: why this wildmatch is not working in file name comparision ?

it worked i just changed chr(39)&$(file)&chr(39) to '$(file)'

Community Browser