Hello! I could use a little help. Probably an easy question but I'm not used to ThinkScript.
So I have a the following code:
How do you pass a variable value to input? Basically I'd like to assign the variable ap2 to secondAggregationPeriod but it gives me an error.
What am I doing wrong?
So I have a the following code:
Code:
def ap1 = getAggregationPeriod();
def ap2;
if ap1 <= AggregationPeriod.WEEK {
ap2 = AggregationPeriod.WEEK;
}
else {
ap2 = AggregationPeriod.MONTH;
}
input secondAggregationPeriod = ap2;
How do you pass a variable value to input? Basically I'd like to assign the variable ap2 to secondAggregationPeriod but it gives me an error.
What am I doing wrong?