I am trying to store all my Qlik tables using a loop, however I would like all tables with "Journal" in the title to be stored in a different location. This is my currently code:
for i=0 to NoOfTables() -1
let vTableName= TableName(i);
If WildMatch([$(vTableName)],'*Journal*') = 0 then
store [$(vTableName)] into [$(vPathQVD)/journal/$(vTableName).qvd] (qvd);
store [$(vTableName)] into [$(vPathQVD)/$(vTableName).qvd] (qvd);
Unfortunately all tables are getting stored as non-journals - I think its because I am using the $(vTableName) variable incorrectly?