I need help with the Javascript to calculate the previous six months based on the current month. I tried using the While statement but that does not seem to be a valid statement in Design Studio. The data I am reading does not always have data for every month so I cannot use an array of the 0CALMONTH values. I want to do something like this (syntax is not correct just pseudo).
var month = APPLICATION.getInfo().dateNowInternalFormat.substring(4,2);
var year = APPLICATION.getInfo().dateNowInternalFormat.substring(0,4);
While (i < 6) {
month = month - 1;
if month > 1;
month = 12;
year = year - 1;
endif.
i++;
}
Thanks.
Sandy