July 30, 201411 yr I have a date field and I'm trying to sort/filter my records to only show records with dates of the current month (July) through the next 3 months (October) however id also like to show records from 2013 and 2012 of these months in particular. Example July 2014 ... ... ... 2013 ... ... ... 2012 ... ... ... Aug 2014 ... ... ... 2013 Not showing any records before July or After Month of October Please help, thanks
July 30, 201411 yr Author How do I do that? I currently have this calculation: Let ( d = Get ( CurrentDate ) ; Date ( Month ( d ) + 0 ; 1 ; Year ( d ) ) & "..." & Date ( Month ( d ) + 4 ; 0 ; Year ( d ))) However its only getting 2014's July - October
July 30, 201411 yr however id also like to show records from 2013 and 2012 of these months in particular. To find records in a range of months over a range of years, your request needs to look something like this (assuming m/d/y date format): {7..10}/*/{2012..2014} This should be relatively easy to calculate from the current date. Note, however, that during the period of September to December, you will need to calculate and submit two requests: one for the remainder of the year, and one for the extra month/s at the beginning of the year.
July 30, 201411 yr Author Ok so... I looked into the Constrain Found Set, which to use I would Show All Records then Constrain the Found Set to Month (Get (Current Date)) ... Month + 4, which should in theory constrain the Show All Records to those dates with the month digit of our current month plus 4, however Constrain found set only lets me put in a specific date, not a calculation. To find records in a range of months over a range of years, your request needs to look something like this (assuming m/d/y date format): {7..10}/*/{2012..2014} This should be relatively easy to calculate from the current date. Note, however, that during the period of September to December, you will need to calculate and submit two requests: one for the remainder of the year, and one for the extra month/s at the beginning of the year. Ok, I understand this calculation however how would I add Get Current Date - finding the current month + 4 so it would change every month as the month changes?
July 30, 201411 yr how would I add Get Current Date - finding the current month + 4 so it would change every month The same way you did before; use the current date to calculate the search string as text. For example: Let ( d = Get ( CurrentDate ) ; "{" & Month ( d ) & ".." & Month ( d ) + 3 & "}/*/" & "{" & Year ( d ) - 2 & ".." & Year ( d ) & "}" ) will return: {7..10}/*/{2012..2014} today (July 30, 2014) and: {8..11}/*/{2012..2014} a few days from now. But as I said earlier, it won't work if today is in October, November or December.
Create an account or sign in to comment