Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Need some help. Why the vEnd_ID3 trace is null? Something doesn't work correctly in my code.
LET vToday = Today();
LET vMonthStartToday = MonthStart(vToday-1);
LET vMonthEndToday = date(MonthEnd(vToday-1));
LET vStartLunaCurenta = vMonthStartToday;
LET vEndLunaCurenta = date(vToday-1);
LET vEndNonLunaCurenta = date(MonthEnd(AddMonths(vMonthEndToday, -1)));
LET vStartUltimaLuna = AddMonths(vMonthStartToday, -1);
LET vStartUltim2Luni = AddMonths(vMonthStartToday, -2);
LET vStartUltim3Luni = AddMonths(vMonthStartToday, -3);
LET vStartUltim6Luni = AddMonths(vMonthStartToday, -6);
LET vStartUltim12Luni = date(AddMonths(vMonthStartToday, -12));
DatesTable:
LOAD * INLINE [
ID, PerioadaVanzare, Start, End
1, 'Ultim 12 Luni', $(vStartUltim12Luni), $(vEndNonLunaCurenta)
2, 'Ultim 6 Luni', $(vStartUltim6Luni), $(vEndNonLunaCurenta)
3, 'Ultim 3 Luni', $(vStartUltim3Luni), $(vEndNonLunaCurenta)
4, 'Ultim 2 Luni', $(vStartUltim2Luni), $(vEndNonLunaCurenta)
5, 'Ultima Luna', $(vStartUltimaLuna), $(vEndNonLunaCurenta)
6, 'Luna Curenta', $(vStartLunaCurenta), $(vEndNonLunaCurenta)
];
LET vEnd_ID1 = FieldValue('End', 1);
TRACE 'vEnd for ID=1: $(vEnd_ID1)';
LET vEnd_ID2 = FieldValue('End', 2);
TRACE 'vEnd for ID=2: $(vEnd_ID2)';
LET vEnd_ID3 = FieldValue('End', 3);
TRACE 'vEnd for ID=3: $(vEnd_ID3)';
LET vEnd_ID4 = FieldValue('End', 4);
TRACE 'vEnd for ID=4: $(vEnd_ID4)';
LET vEnd_ID5 = FieldValue('End', 5);
TRACE 'vEnd for ID=5: $(vEnd_ID5)';
LET vEnd_ID6 = FieldValue('End', 6);
TRACE 'vEnd for ID=6: $(vEnd_ID6)';
EXIT SCRIPT;
Thanks