2 Replies Latest reply: Oct 15, 2014 1:31 PM by Martyn Birzys RSS

    How to detect a missing month in script

    Anna Perini

      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?