The Mad Jammer Posted June 21, 2005 Posted June 21, 2005 I created a calendar of work days with the help of another of the forum's gurus, comment. In it the calendar is represented by a concatenated string of letters (X for non-workdays and W for workdays), the numeric position of each letter in the string, when added to the start date of the calendar, produces the representative date. The calendar is built in a script loop that starts at a defined begin date field and stops after an end date field to create the string of calendar letters. There is also a function to change a date from an X to a W and vice versa. Weekend days are defaulted to be non work days when the calendar is built. Now I want to take it this concept one step further and make it more visually pleasing and easier to work with. I would like to create a grid that looks like a calendar and fill it with the characters in the calendar string, map the characters to the correct day of the week and be able to move from month to month in the calendar. I would also like to still be able to change the day from a work day to a non workday and vice versa. I've been using a radio button and a script to update the type of workday but would prefer to incorporate a toggle switch type of method on each date character to change from workday to non-workday and back. I would also like whatever object is holding each occurrance of the workday type to change color depending on the type of workday it is. I have in mind a square that toggles between two colors depending on the workday type, sort of like the background of a date cell on a calendar. I would also like to be able to click on a month and load the table with the days of the month I just clicked on. Mind you, the calendar I'm talking about started June 1st, 2005 and ends June 2 , 2006. How would I go about implementing such a thing? Thanks The Mad Jammer
comment Posted June 21, 2005 Posted June 21, 2005 What, you haven't finished this already? This is not much different from a date picker, i.e. you need a "floating" calendar based on a global anchor date and some calc fields to display the month of the anchor date. I like to work with 7 calculated date fields and 6 records in a portal to get a 7x6 grid, but other arrangements are also possible. Each date field can have an adjacent calculation to find the date's position in the string - I believe that should be easy by now. Clicking on a date loads that date into a global date register, and you'd use that along with a global DesiredType field to modify the string. I am not being more specific, because I don't know how/where you keep the string/s. Do you have a record for each string-year? Is this file used for anything else, or could the calendar be incorporated into the same file?
The Mad Jammer Posted July 11, 2005 Author Posted July 11, 2005 comment, Yes, I finished this from what you gave me in the last discussion. My user can define their own begin and end date for a calendar and a script will generate the workkdays and non workdays. They can also edit the generated calendar by entering the change date ( a global) and the type of day they want to change to (another global) and click and update button to replace the character in the data string. This all works great. Again many thanks for your help. I was just casting about for ideas on how to one-up the solution you supplied to make it more user friendly and easier to work with. The file is a stand-alone file, which is nice because it doesn't affect anything else other than itself, in other words, only one department is using it. The number of workdays is calculated by another file so any change to this file will immediately be evident, which is also good. You are correct about my wanting to use a date picker to tackle this. Frankly what I would like to have is a floating calendar where each cell contains the calculated date and a radio button (or some object) that identifies the kind of day it is (workday or non workday) and by clicking on the object will toggle the day type. So I want to display the calendar as a grid, have the dates to show up on the proper day, have a left and right arrow to move from month to month and be able to simply click on the date and change it from one type of day to the other. There is only one string of data that represents the dates. I don't have multiple strings of dates. Visual Basic has a date picker already defined and I'm used to using something like that. Manipulating that ActiveX object is quite easy for me. Not quite so easy with FMP. the Mad Jammer
comment Posted July 11, 2005 Posted July 11, 2005 Play with the attached file. CalendarString.fp3.zip
The Mad Jammer Posted July 14, 2005 Author Posted July 14, 2005 Can't open the file. After renaming to an fp5 file Windows XP send up an error screen, you know the new GPF failure screen. The Mad Jammer
The Mad Jammer Posted July 14, 2005 Author Posted July 14, 2005 Disregard the last note. I can open the file in FMP 7 but not not FMP 5. comment, On first glance this is a very nice looking interface. Thanks the Mad Jammer
Recommended Posts
This topic is 7070 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