RobWunderlich / Qlikview-Components

A library for common Qlikview Scripting tasks
197 stars 99 forks source link

Qvc.Calendar: _f_DateIsFuture manteins last field name of calendar created #74

Closed pljluca closed 5 years ago

pljluca commented 6 years ago

Hi Rob,

I think there is an issue in Qvc.Calendar, the private variable _f_DateIsFuture used in

SET _qvctemp.vMaxModifier = 'Max({1<@(_f_DateIsFuture)={0},_Qvc.DummyField=@(_Qvc.Calendar.v.SelectedFieldList_$(_fieldPrefix))>}'; 

manteins last field name of calendar created.

I tried to verify the issue with yours example Calendar.qvw in library. In the script I moved the "Future Dates Calendar" tab before "Fiscal" tab. I looked the variables: _f_DateIsFuture and Future_vSetMTDModifier and I found to

_f_DateIsFuture >>> [ExtFields _Qvc.Calendar_DateIsFuture]

Future_vSetMTDModifier >>> [Future Date]=,[Future Day]=,[Future Weekday]=,[Future Year]=,[Future Month]=,[Future MonthName]=,[Future Quarter]=,[Future _DateSerial]=,[Future _MonthSerial]=,[Future _QuarterSerial]=,[Future _WeekSerial]=,[Future _Qvc.Calendar_DateIsFuture]=,[Future Week]=,[Future Year-Week]=,[Future Year-Month]=,[Future Year-Quarter]=, [Future _MonthSerial] = {$(=Max({1<$(_f_DateIsFuture)={0},_Qvc.DummyField=$(_Qvc.Calendar.v.SelectedFieldListFuture)>} [Future _MonthSerial]))}, [Future Day] = {"<=$(=Day(Max({1<$(_f_DateIsFuture)={0},_Qvc.DummyField=$(_Qvc.Calendar.v.SelectedFieldListFuture)>} [Future _DateSerial])))"}

as you can see there is $(_f_DateIsFuture) in formula that will be replaced by [ExtFields _Qvc.Calendar_DateIsFuture]

Could this generate some problems? I think yes but I am not sure. Please, could you check it?

Thanks a lot. Luca

RobWunderlich commented 5 years ago

Fixed in release v11.3