architennis Posted January 3, 2007 Posted January 3, 2007 Hi, I'm a beginner with FM7. I'm trying to make a simple printout-able monthly calendar. I don't see how to put 31 records on one layout... so I'm thinking of defining 31 different fields and putting each month on a record. Does anyone have any tips on how to define records so a starting date layed out on the day of the week of my choice (depending on where the 1st of the month is) will generate the rest of the dates for that month? Or is there a better way—there must be. Please keep it fairly simple, as I have only barely looked at scripting once ever. Thanks for any and all help, Doug
comment Posted January 3, 2007 Posted January 3, 2007 See this post and the following ones in the same thread.
architennis Posted January 5, 2007 Author Posted January 5, 2007 Thanks for the quick response. I looked at that thread, and even tried pasting the code into a calculation field to see what would happen (it's all over my head, so it was with fingers crossed). Apparently my FM 7 doesn't have gDate available. Am I right about this? If so, the calculation you pointed me to won't work, I don't think. Any other ideas? Once again, thank you for helping out this beginner. Doug
comment Posted January 5, 2007 Posted January 5, 2007 gDate is a global date field. You need to define it before defining the repeating calculation field. gDate is the 'anchor' date for the calculation: the month displayed is the month of gDate.
architennis Posted January 9, 2007 Author Posted January 9, 2007 Thanks for the response. I've been a little busy, but I'm still working on this. I got the gDate field created. And the repeating date field created using your: Let ( [ m = Month ( Extend ( gDate ) ) ; y = Year ( Extend ( gDate ) ) ; firstOf = Date ( m ; 1 ; y ) ; d = firstOf - DayOfWeek ( firstOf - 1 ) + Get ( CalculationRepetitionNumber ) ] ; d ) I set the Format>Field Format to have 1 through 31 shown (of 31 defined in the calculation definition)... in a horizontal orientation. So the next question is how do I make (5 or 6) rows with 7 fields in each row? And can I move them around within my layout to be where I want them? Once again, thanks in advance.
comment Posted January 9, 2007 Posted January 9, 2007 Hmm... seems you haven't read that thread carefully enough. The repeating field should have 42 repetitions. You put 6 instances of the field on the layout (vertically), each instance showing 7 repetitions (horizontally). This will give you a 6x7 grid.
architennis Posted January 23, 2007 Author Posted January 23, 2007 Comment, Well, I finally got my calendar done after much messing around. I used one record with 12 (+1) layouts, 12 gDates, and 12 dayDates based on your wonderful calculation (see above posts). Anyway, it works. I layed it out to print so I could fold the 11x8.5 pages in half and staple them together. So I had to have half of one month printed on the left and half of a different month on the right. I sure hope I use this FM file for several years of calendars after all the time it took. Thanks again for the invaluable help.
comment Posted January 23, 2007 Posted January 23, 2007 Hmm. I am not sure why you would need "12 (+1) layouts, 12 gDates, and 12 dayDates". If you want "several years of calendars", you should have one layout, and a record for each month. The 'anchor' date would NOT be a global in such case - it would be specific for each month record. This way you could keep adding records until December 4000.
Recommended Posts
This topic is 6575 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now