Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

canmarroig
Not applicable

How to detect a missing month in script

I've a problem i'd like you to help me to solve: i've 3 different sources to use to import data:

- an excel for the current month: A.xls

- 12 file for the previous 12 months: yearmonth_B.xls

- in case of lack of the previous month, i've a further excel file. C.xls

For instance: today my A file is 201410.xls, if I can't find B file 201409.xls 'ive to use C.xls

I've created 2 variables:

let vMonthMax=peek('Month',0,tmp)

let vMonthPrec=peek('Month_prec',0,tmp)

but i've no idea how to put the condition to check if there is file B. Can you help me?

Tks

Tags (2)
2 Replies
Not applicable

Re: How to detect a missing month in script

Hi

you can use the below.

if  isnull(FileTime($(vMonthPrec) & '.xls')) then

     Load from c.xls

else load from B.xls

End if

martyn_birzys
Not applicable

Re: How to detect a missing month in script