Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I can´t solve this if/else in script. My aim is to load a transactiontabel diffrent depending month(today())
IF Month(Today())=1 OR Month(Today())=2 then
FOR i = $(vMinYear) TO $(vMaxYear)
Let vStartDatum = Date#($(i) & '-01-01', 'YYYY-MM-DD');
Let vSlutDatum = Date#($(i) & '-12-31', 'YYYY-MM-DD');
Tabel:
Load
..
From ...
ELSE
FOR i = $(vYearToday) TO $(vMaxYear)
Let vStartDatum = Date#($(i) & '-01-01', 'YYYY-MM-DD');
Let vSlutDatum = Date#($(i) & '-12-31', 'YYYY-MM-DD');
Table:
Load
..
From ...
It the part For i = ... that doesn´t work with the if-statement.
Did you verify values of variables $(vMinYear) , $(vMaxYear) and $(vYearToday)?
yes. the work fine. I´d change and use a switch case.
NEXT is missing in IF control statement