April 23, 201114 yr A system that we are working on generates workflow projections based on the week of year. Jobs are scheduled out over the course of year based on their required ship date, phrased as a calendar week. The script needs to locate records that are scheduled to ship with a range of the current week [ WeekOfyear(Get(CurrentDate)) ] and a variable that represents the number of weeks ahead the operator wishes to look. So...a simple scripted range find which sets the Ship Week field [ WeekOfYear(Get(CurrentDate))& "..." & WeekOfYear(Get(CurrentDate)+ $WeekRange ] works great. The issue that was just raised, is what about the end of year when the addition of the $WeekRange runs into the coming year. Any suggestions are welcome. Thanks in advance.
April 24, 201114 yr The definition of "week of year" is rather loose. Even Filemaker has two: WeekOfYear() and WeekOfYearFiscal(). Actually, it's 8 because WeekOfYearFiscal() has 7 possible variations. Once you define exactly what your "week of year" is (esp. at year boundaries), you can focus on the calculation.
Create an account or sign in to comment