Skip to Content
0
Jun 12, 2014 at 09:34 AM

Variables for prior and next periods in logic

18 Views


Hi,

I'd like to do something that I would have thought should be quite simple, but I just haven't managed to get it right.

In Category, we use the properties Year and Month. For example:

Member Year Month

Actual 2014 APR

SP 2016 DEC

The issue is that we would like to create SP (Strategic Plan) for 3 years, of which the year in the property, 2016, is the first.

Creating variables for the month and for the first SP year is simple:

*SELECT(%CYEAR_SP%,"[YEAR]","CATEGORY","[ID]= 'SP'")

*SELECT(%CMONTH_SP%,"[MONTH]","CATEGORY","[ID]= 'SP'")

I'd then like to dynamically create 3 variables based on properties Year and Month; %SP1%, %SP2% and %SP3%, that I can use in scoping, in *WHEN/*IF, in GET and in *REC. It should be something like:

%SP1% = %CYEAR_SP%.%CMONTH_SP% (2016.DEC)

%SP2% = %CYEAR_SP%(+1).%CMONTH_SP% (2017.DEC)

%SP3% = %CYEAR_SP%(+2).%CMONTH_SP% (2018.DEC)

However it doesn't seem possible to use mathematical expressions for this, and I haven't managed to use NEXT or PRIOR successfully either.

Has anybody out there encountered this?

/Cecilia