![]() |
|||
| Version www.capesoft.com Updated Tuesday 09 January 2007 |
|||
![]()
|
|
||||||
| Object Docs |
Have you ever wanted to drop your date information onto a calendar? Leave, birthdays, order due dates, etc look so much more comprehensive on a calendar than in a list box. Or what about a scheduler\planner to view appointments or tasks, and edit them?
Enter HotDates. Add HotDates to your program and using the powerful and intuitive templates, you'll be able to view date related information in a calendar, drilling down to month, week and\or day views in a few minutes. Print your calendar straight to a printer, or edit date related information from the calendar using Drag and Drop, Cut\Copy\Paste or a traditional update.
Included in HotDates:
![]()
De-activate items in the legend (using the checkboxes in the list):
Change priority of items viewed (using the runtime priority buttons):

For this tutorial, we'll use the AutoLog.app that ships with Clarion 5.5. (I've included it in the clarionx\3rdparty\examples\HotDates\Tutorial for Clarion 6 users). I've included a completed tutorial in the examples. It's in the clarionx\3rdparty\examples\HotDates\Tutorial\Completed directory.
The colors and settings tables aid us in setting up the colors styles and
translation of day and month names for the application. You may not require both
of these in your application, but for now, let's add them in so you can see what
they are about.
1. Open the dictionary in the clarionx\3rdparty\examples\HotDates\Tutorial
directory.
2. From the File menu, select the Import Text option.
3. Using the filedialog window, find the HotDatesSettingsTables.txd file which
is located in your clarionx\3rdparty\libsrc directory by default.
4. Save and exit from the dictionary.
If your application is not open - then open it in the Clarion IDE.
1. From your Application menu, select the Template Utility...
item.
2. Select the ImportHotDatesDatePickerABC template utility from the Select
Utility window
3. From your Application menu, select the Template Utility...
item.
4. Select the ImportHotDatesSettingsProceduresABC template utility from
the Select Utility window.
5. Open the frame and add a Setup menu to your menubar
6. Add a Colors item to your Setup menu, and call the BrowseHotDates_Colors
procedure from this item.
7. Add a Settings item to your Setup menu and call the BrowseHotDates_Settings
procedure from this item.
| 1. | You need to first add the Global Extension Template. To
do this: 1.1. Open the abcdemo.app in the Clarion IDE, and click on the Global button. 1.2. In the Global Properties window, click on the Extensions button. 1.3. Click on the Insert button and select the Activate_HotDates extension template. |
We do this after adding the DatePicker, so that the DatePicker procedure field in the Global Extension template (Options tab) is automatically populated.
A 1 to 12 month Calendar is a view that will show you very minimal detail - basically no descriptions, just colorized dates. It is aimed at giving you a broad spread of a wide date range of data into one summarized calendar - up to a year (which is scrollable).
| 1. | Open the Window Formatter for the BrowseTripLog window (Right-click on the procedure name in the tree and select the Window option) |
| 2. | Add a tab control to the sheet and call it 'Calendar'. |
| 3. | Move the list from the window to the By VIN Number tab (so that we have a clean tab to work with). |
| 4. | Resize the sheet (and window) to about 400 by 240 to fit the calendar nicely on it. |
| 5. | Select Populate - Control Template... from the menu. |
| 6. | Select the HotDates_Calendar template from the Control template list. |
| 7. | Click the top left corner for the group of controls to be
placed on the window. You will see 12 square list boxes (one for each month), the legend controls, and a group of buttons (ScrollBack, ScrollForward, Print and Refresh). |
| 8. | Right-Click on one of the controls and select the Actions menu item. |
| 9. | Click on the Tables button. |
| 10. | Insert the TripLog table, ordered by the TRI:VinDateKey and the Vehicles table. You'll also need to add the HotDates_Colors table to the Other tables. |
| 11. | Goto the Data tab and set it up as follows: |
| 12. | You will need to create a local data field: Loc:BusinessOnly (a byte with a true value of 1 and a false of 0 that has a checkbox as a screen control). |
| 13. | The Filter field is: (TRI:BusinessTrip=1) or ~Loc:BusinessOnly (this is so we can restrict to BusinessTrips if we check the checkbox) |
| 14. | The Style field: band(pointer(Vehicles),255). There is no autonumber on this file (which is what you could normally use) - so we'll use the pointer instead. Note that there are only 255 styles available, so if we have more that 255 records in the file, then these will be doubled up (in style) |
| 15. | Go to the Styles tab and set it up as follows: |
| 16. | Note that we use the parent table for the styles file. |
| 17. | The StyleID for the legend matches the Style we set up on the DataBase (so that the Style in the legend corrolates to that set in the calendar) |
| 18. | The Description is indicative of the car that did the trips: 'clip(VEH:Make) & ' ' & clip(VEH:Model) & ' ' & clip(VEH:Year)' |
| 19. | Note that we use colors from the HotDates_Colors table which is in a different table to that actual style, so we'll need to put some handcode to get the correct color. |
| 20. | Go to the Filter Embed and enter the following code in the
'Before Adding Style to the palette' embed:
|
| 21. | Go to the Options Tab |
| 22. | The StartDate is set to start at January this year. |
| 23. | 1. Set the From Date to the date to 'date(1,1,year(today()) - 10)'.
This will go back to 10 years ago. 2. Set the To Date to the date to 'date(12,31,year(today()) + 1)'. This will go up to next year. 3. The scroll by is set to 12 to scroll an entire year at once. |
| 24. | The procedure for the MonthViewer has not yet been created, so we'll create that after we're finished with this window. |
| 25. | Click OK to return to the Window Formatter. |
| 26. | Populate the Loc:BusinessOnly checkbox on the window. (Populate - Column and select Loc:BusinessOnly) |
| 27. | Double-click on the checkbox to bring up the embeds and
place a call to reset the window in the Accepted embed:
|
| 1. | If you've exited out of the Window Formatter for the BrowseTripLog window, then re-open it again. |
| 2. | Select Populate - Control Template... from the menu. |
| 3. | Select the HotDates_CalendarUpdate template (for adding update controls to your 1 to 12 month Calendar) from the Control template list. |
| 4. | Click the top left corner for the group of controls to be placed on the window. You will see the Insert, Change and Delete buttons appear on the window. |
| 5. | Right-click on one of the buttons and select the Actions... option |
| 6. | Go to the Prime Fields on Insert tab to the following: (Note you will need to wizard up a SelectVehicle window) |
| 7. | Basically what's happening here is that when you're inserting, you want the trip to start at the date clicked, and you want it to be attached to a selected variable (which is selected from the BrowseVehicles procedure). |
| 8. | Go to the Options tab and check the Add Update buttons to popup and the Allow inserts when a record exists on a date checkboxes (i.e. we want to be able to edit via popup and we also want to be able to insert a record on a particular day - even if there is already a trip allocated for another vehicle). |
Before continuing we need to add a Select control to the BrowseVehicles routine.
| 1. | If you've exited out of the Window Formatter for the BrowseTripLog window, then re-open it again. |
| 2. | Select Populate - Control Template... from the menu. |
| 3. | Select the BrowseSelectButton template from the Control template list. |
| 4. | Click the top left corner for the group of controls to be placed on the window. |
The MonthViewer is designed to show you a entire month's data - with more detail than the 1 to 12 month Calendar. This will give you a description attached to each colorization, and if more than one data exists for a specific date, then it will show you more than the highest priority data for that day.
| 1. | Double-Click on the MonthViewer (ToDo) procedure and select Window - Generic Window Handler from the Templates list. |
| 2. | Enter the Procedure's prototype and parameters
fields as the following:
|
| 3. | Open the Window formatter (use the Simple Window
template when prompted) and resize the window to: 385x220. You'll also need to make sure that this is an MDI Child window (the MDI Child checkbox on the Extra tab on the Window Properties window). |
| 4. | Select Populate - Control Template... from the menu. |
| 5. | Select the HotDates_MonthViewer template from the Control template list. |
| 6. | Click the top left corner for the group of controls to be
placed on the window. You will see 2 buttons in a Group and the legend controls. |
| 7. | Right-click on one of the controls and select the Actions menu item. |
| 8. | Click on the Tables button and setup the tables as follows (You'll also need to add the HotDates_Colors table to the Other tables):. |
| 9. | Enter 'pStartDate' into the Start At Date field. |
| 11. | Goto the Data tab and set it up as follows: |
| 12. | You will need to create a local data field: Loc:BusinessOnly (a byte with a true value of 1 and a false of 0 that has a checkbox as a screen control). |
| 13. | The Filter field is: (TRI:BusinessTrip=1) or ~Loc:BusinessOnly (this is so we can restrict to BusinessTrips if we check the checkbox) |
| 14. | The Style field: band(pointer(Vehicles),255). There is no autonumber on this file (which is what you could normally use) - so we'll use the pointer instead. Note that there are only 255 styles available, so if we have more that 255 records in the file, then these will be doubled up (in style) |
| 15. | Go to the Styles tab and set it up as follows: |
| 16. | Note that we use the parent table for the styles file. |
| 17. | The StyleID for the legend matches the Style we set up on the DataBase (so that the Style in the legend corrolates to that set in the MonthView) |
| 18. | The Description is indicative of the car that did the trips: 'clip(VEH:Make) & ' ' & clip(VEH:Model) & ' ' & clip(VEH:Year)' |
| 19. | Note that we use colors from the HotDates_Colors table which is in a different table to that actual style, so we'll need to put some handcode to get the correct color. |
| 20. | Go to the Filter Embed and enter the following code in the
'Before Adding Style to the palette' embed:
|
| 22. | Go to the Options Tab and leave the default settings as they are. You can enter 'WeeklyPlanner' into the Drill down Procedure procedure. |
| 23. | Place the Loc:BusinessOnly checkbox control on your window (not inside the ?MonthViewGroup control) |
| 24. | Double-click on the Loc:BusinessOnly checkbox control and in
the accepted event embed, place a call to a forced window reset:
|
| 1. | If you've exited out of the Window Formatter for the MonthViewer window, then re-open it again. |
| 2. | Select Populate - Control Template... from the menu. |
| 3. | Select the HotDates_MonthViewerUpdate template from the Control template list. |
| 4. | Click the top left corner for the group of controls to be placed on the window. You will see the Insert, Change and Delete buttons appear on the window. |
| 5. | Right-click on one of the buttons and select the Actions... option |
| 6. | Go to the Prime Fields on Insert tab to the following: (Note you will need to wizard up a SelectVehicle window) |
| 7. | Basically what's happening here is that when you're inserting, you want the trip to start at the date clicked, and you want it to be attached to a selected variable. |
| 8. | Go to the Options tab and ensure the Add Update buttons to popup checkbox is checked (i.e. we want to be able to edit via popup). |
The Planner gives you a bit more scope to work with than the MonthView. The MonthView is a 2 dimensional - date and "activities", whereas the Planner is 3 dimensional - Date, "activities" and parent data. I guess the best would to show a pictoral example:
The left column contains the parent data (in this case the 'People'). Each of the Day columns to the right of that contains activities that pertain to that Person.
| 1. | Double-Click on the WeeklyPlanner (ToDo) procedure and select Window - Generic Window Handler from the Templates list. |
| 2. | Enter the Procedure's prototype and parameters
fields as the following:
|
| 3. | Open the Window formatter (use the Simple Window
template when prompted) and resize the window to: 525x255. You'll also need to make sure that this is an MDI Child window (the MDI Child checkbox on the Extra tab on the Window Properties window). |
| 4. | Click the top left corner for the group of controls to be
placed on the window. You will see 2 buttons in a Group and the legend controls. |
| 5. | Delete the controls that you don't require. You must leave the ?Planner control. |
| 6. | Right-click on one of the controls and select the Actions menu item. |
| 7. | Click on the Tables button. |
| 8. | Insert the tables that will contain the data to populate in the ListBox. The Primary table is the table that contains the data for the left column. (Note that we don't need the HotDates_Colors table here as we'l be styling this calendar slightly differently) |
| 9. | On the General tab: |

| 10. | Go to the Data tab. |
| 11. | The Left Heading field contains the heading (a constant, vairable or expression) for the left-most column. |
| 12. | The Displayed Data field contains the data for the left most column. |
| 13. | Note the Style field - instead of colorizing the cells by vehicle, we now have the rows which identify each vehicle. We'll colorize these cells with a different detail - i.e. business or private (2 for business and 1 for private). |
| 14. | The Data to Display field will contain the field or expression to place the data in each item in the row. |
| 15. | Go to the Styles tab and set the settings there as follows (setup the styles with differing colors): |

| 16. | Go to the Options tab and set the settings there as follows: |

| 17. | Save and quit out Window Formatter. |
| 18. | Open the Embeds - and find the Local Objects | Abc Objects |
WindowManager | Init | CODE | ParentCall and enter the following source
immediately after the Parent Call:
This will set the StartDate to the date that we've passed to the window on startup. |
| 1. | If you've exited out of the Window Formatter for the WeeklyPlanner window, then re-open it again. |
| 2. | Select Populate - Control Template... from the menu. |
| 3. | Select the HotDates_PlannerUpdate template from the Control template list. |
| 4. | Click the top left corner for the group of controls to be placed on the window. You will see the Insert, Change and Delete buttons appear on the window. |
| 5. | Right-click on one of the buttons and select the Actions... option |
| 6. | Go to the Prime Fields on Insert tab to the following: (Note you will need to wizard up a SelectVehicle window) |
| 7. | Basically what's happening here is that when you're inserting, you want the trip to start at the date clicked, and you want it to be attached to the Vehicle for that row. |
| 8. | Go to the Options tab and ensure the Add Update buttons to popup checkbox is checked (i.e. we want to be able to edit via popup). |
The DayScheduler will help us view the activities for each vehicle for the day.
There are two places in the tutorial application where we need to add the DatePicker Lookup HotKey extension: UpdateVehicles and UpdateTripLog.
| 1. | Double-Click on the DayScheduler (ToDo) procedure and select Window - Generic Window Handler from the Templates list. |
| 2. | Enter the Procedure's prototype and parameters
fields as the following:
|
| 3. | Open the Window formatter (use the Simple Window
template when prompted) and resize the window to: 465x300. You'll also need to make sure that this is an MDI Child window (the MDI Child checkbox on the Extra tab on the Window Properties window). |
| 4. | Click the top left corner for the group of controls to be
placed on the window. You will see 2 buttons in a Group and the legend controls. |
| 5. | Right-click on one of the controls and select the Actions menu item. |
| 6. | Click on the Tables button. |
| 8. | Insert the tables that will contain the data to populate in the ListBox. The Primary table is the table that contains the data for the left column. (Note that we don't need the HotDates_Colors table here as we'l be styling this calendar slightly differently) |
| 9. | On the General tab, set the Display date to pStartDate. |
| 10. | Go to the Headers tab and set the following settings (besides the defaults): |

| We've filtered out the vehicles that have a sold date (so the filter is VEH:DateSold=0), as we're only interested in current vehicles. Each vehicle will have it's own column showing the day's scheduled activity. The Displayed data shows the contents of the column heading (in this case clip(VEH:Make) & ' ' & clip(VEH:Model). |
| 11. | Go to the Data tab and set the following settings: |

| We have an additional Time Limiting group - because in this HotDates view, we can view time detail. This is similar to the Date Stored as settings. |
| 12. | Go to the Styles tab and set the following settings: |

| 1. | If you've exited out of the Window Formatter for the DayScheduler window, then re-open it again. |
| 2. | Select Populate - Control Template... from the menu. |
| 3. | Select the HotDates_SchedulerUpdate template from the Control template list. |
| 4. | Click the top left corner for the group of controls to be placed on the window. You will see the Insert, Change and Delete buttons appear on the window. |
| 5. | Right-click on one of the buttons and select the Actions... option |
| 6. | Go to the Prime Fields on Insert tab to the following: (Note you will need to wizard up a SelectVehicle window) |
| Basically what's happening here is that when you're inserting, you want the trip to start and end at the time block selected, and you want it to be attached to the Vehicle for that column. In this case we've checked the End time is at the end of the last block which means that the time selected is inclusive. | |
| 7. | Go to the Options tab and ensure the Add Update buttons to popup checkbox is checked (i.e. we want to be able to edit via popup). |
| 1. | Go back to the application IDE tree window, and double click on the UpdateVehicles procedure and click the Extensions button. |
| 2. | Select the HotDates_DatePickerHotKeyLookup template from the Extension template list. |
Repeat these 2 steps for the UpdateTripLog window.
Another addition - you can add the DayScheduler to the options in the Main window, and then post an accepted event at startup to open the DayScheduler automatically.
The Global
Extension template and Adding a DatePicker window to your application
Adding a 1 to 12 Month Calendar to your application
Adding Update buttons to your Calendar/View
Adding a MonthViewer to your application
The Weekly Planner Control Template
Adding a Day Scheduler to
your application
Ways
to use the DatePicker effectively (the
Lookup button, and the
window HotKey)
If you would like to use the HotDates_Colors table in your application for styling, then check this out in the Useful Tips section.
| 1. | The
first thing you need to do is add the DatePicker procedure (in a Multi-DLL
application, this would be your root or data-DLL) - actually, you don't
have to do this, but you'd lose a bunch of functionality by NOT doing
this:
1. If your application is not open - then open it in the Clarion IDE. Check out the FAQs on using your own DatePicker if you'd like this option rather. |
| 2. | Then you need to add the Global Extension Template. To
do this: 1. Open your app in the Clarion IDE, and click on the Global button. 2. In the Global Properties window, click on the Extensions button. 3. Click on the Insert button and select the Activate_HotDates extension template. The following prompts are available on the Options tab of the Global Extension template:
1.1. Setting a global Refresh
Event means that when performing operations between two calendar
windows (like Drag and Drop or Cut/Copy/Paste), the originating window can
be refreshed on a successful operation completed on the recipient window.
You need to set this event to a unique event in the user event range
(0400H-0FFFH). The default is 082EH.
3. If you'd like to customize your Planner and Scheduler zoom settings,
then you can check the Customize Zoom Settings checkbox and the
Zoom settings groups will appear (otherwise the default will be used),
allowing you to set:
4.1. You can select a first weekday (by default Sunday) using the First
Weekday drop down. This will force the left most day of all the
calendars to the day you specify. |
| 1.1. | Open the Window Formatter for the window that you are wanting to add the Calendar to. |
| 1.2. | Select Populate - Control Template... from the menu. |
| 1.3. | Select the HotDates_Calendar template from the Control template list. |
| 1.4. | Click the top left corner for the group of controls to be
placed on the window. You will see 12 square list boxes (one for each month), the legend controls, and a group of buttons (ScrollBack, ScrollForward, Print and Refresh). |
| 1.5. | Delete the controls that you don't require. These could include some of the month list boxes (if you don't require a full 12 month calendar) starting from the bottom right and proceeding left, the legend priority buttons (two buttons one with the SortUp and the other with the SortDown icons), the ScrollBack & ScrollForward buttons. You must leave the ?CalendarGroup and at least one list control. |
| 1.6. | Right-Click on one of the controls and select the Actions menu item. |
| 2.1. | Click on the Tables button. |
| 2.2. | Insert the files that will contain the data to populate on the Browse. If there is more than one table required to extricate the data, then use the one with the StartDate as the Primary file. This will also be the file which gets primed for update when we add the update buttons later. If you are using the HotDates_Colors table for your style-colors, then you need to add the HotDates_Colors table to your Other Tables. |
| 2.3. | You can also enter an optimum key to sort the table by. This should be a unique key (to obtain the correct record for updating). |
| 2.4. | On the General tab: |

| 2.5. | The StartDate field sets the month and year of the top-left month in the calendar when the window is opened. Leave it blank for today. Tip: You can enter date(1,1,year(today())) to show the whole of this year starting at January. |
| 2.6. | If you want to be able to scroll (i.e. back date or forward
date), then check the Enable Scrolling checkbox. Otherwise the
calendar will be fixed. 1. Set the From Date to the date to which you can scroll _back_ to. (leave blank for January last year) 2. Set the To Date to the date to which you can scroll _forward_ to.(leave blank for December next year) 3. Set the number of months to scroll by in the Scroll by (months) entry (normally 1 - although you may want to jump by up to an entire year - in which case you would enter 12). |
| 2.7. | The Print group contains options that pertain to the
calendar when outputting to a printer: 1. Heading: (oddly enough) the heading that appears at the top of the report. |
| 3.1. | Goto the Data tab. |
| 3.2. | Select the method by which the Data is stored (either a single date, a Date Range [i.e. FromDate-ToDate], a Date Duration or handcoded). |
| 3.3. | You'll need to enter a from date, an end date (for Date Ranges) and/or a date duration (for DateDuration) expression depending on the method that you selected in the 'Stored As' drop down. |
| 3.4. | If you're using a ToDate (end date) option, and your end dates may be blank, then you'll need to check the ToDate optional (infinite when 0). Otherwise the EndDate will be assumed to be correct at 0. |
| 3.5. | If you have multiple records for days, and you would like to use totalling to reflect a sum, count, average, maximum or minimum of the values for those days, then you can check the Style based on totalling checkbox. |
| 3.6. | If you checked Style based on totalling checkbox,
then pick a Total Type from the drop combo. Count will count
the records that pertain to each calendar day; Sum will add the Total
Field/expr for each record that pertains to a day; Maximum will
reflect the maximum to the Total Field/expr for each record that
pertains to a day; Minimum does the inverse, and Average reflects the mean
od the Total Field/expr for all records for each day.
Note: The result (for each day) will be stored in DatesQueue:<x>.Total (where x is the ActiveTemplateInstance for this control template addition). You can use this value in your Style expression. |
| 3.7. | The Style entry needs to contain a field or expression for the style of the data on the view. Check out the Useful Tips on more possible uses. This Style ID is a numeric that references to the Style ID in the styles (or legends) setup on the Styles tab. |
| 3.8. | You can enter an expression to filter unwanted data in the Filter field. |
| 3.9. | To code a more indepth filter, you can use the Embeds, accessible via the Filter Embed button. For more details, check out the useful tips section on Coding Manual Filters |
| 4.1. | Go to the Styles tab. |
| 4.2. | This tab is used to setup the details for the legend controls. You can have up to 5 columns in the legend control (in case you want it horizontally, rather than vertically) |
| 4.3. | If you want to be able to optionally view styles at runtime, then check the Use Checkboxes to activate styles checkbox. Otherwise all styles will be displayed. |
| 4.4. | To keep your style settings (style priority and active state) between sessions, you can check the Save and Restore checkbox. |
| 4.5. | If your styles are stored in a style file, then you can check the Load Styles from a File checkbox. Otherwise you can set them up in the Manual Styles list box. |
| 4.6. | If your styles will be loaded from a file, then you need to
enter the Styles details. The File, Key, StyleID to use, Colors and
Description (which is the text in the style entry in the legend list
describing the style). The StyleID must be a byte value (between 1 and
255) - which will be used as a reference to the Style field on the Data
tab. You don't have to have a relationship between the table used for the
styles and the table for the data - although a Style reference in the data
should exist in the Styles table.
If you check the Sort styles in Key order checkbox, then when the items initially appear in the listbox, they will appear sorted in the order of the key specified in the Key field - otherwise they will be sorted in StyleID order. |
| 4.7. | Similarly with Manual styles, you can set the above settings from the template. |
| 5.1. | Go to the Options Tab |

| 5.2. | If you don't want the year to be shown in the month header, then check the Year portion of date is irrelevant checkbox. This is useful for yearless calendars (like Birthday calendars, etc). |
| 5.3. | You can Enable Drill Down and enter a drill down procedure in the
Drill down procedure
drop list. This will enable a day/week/month to be expanded. If your drill
down procedure takes more than one parameter, then you can handcode the
call to the drill down using the Handcode Drill down call embed
button. You need to pass the clickdate property so that the receiving
procedure will display the correct start date. Example:
|
| 5.4. | The Cell Tips section lets you set up cell tip information. You can leave this blank to omit cell tips. The field provided is a formula in which you can use fields from files in your HotDates tables. If you require the use of other fields (from tables that are not in the HotDates tables) - then you can use the Coded Lookups button to handcode into the embed. |
| 5.5. | If you have Replicate added to this application, then you will be able to Turn Replicate off during calendar loading. This is very useful if your HotDates view has a lot of data, and the calendar takes a long time to load. Please read the Clarion5.5 caveat in the FAQs. |
| 5.6. | Go to the Classes tab and set the Based on Class to YearClass and the Object Name to something unique and descriptive like ThisYear1. |
| 1.1. | Open the Window Formatter for the Calendar/View window. |
| 1.2. | Select Populate - Control Template... from the menu. |
| 1.3. | Select the HotDates_CalendarUpdate template (for adding update controls to your 1 to 12 month Calendar), HotDates_MonthViewerUpdate template (for adding update controls to your MonthViewer) or HotDates_PlannerUpdate template (for adding update controls to your Planner) from the Control template list. |
| 1.4. | Click the top left corner for the group of controls to be placed on the window. You will see the Insert, Change and Delete buttons appear on the window. |
| 2.1. | Right-click on one of the buttons and select the Actions... option |
| 4.2. | If you want to edit view Right-Click and popup, then check the Add Update buttons to popup checkbox. |
| 4.3. | Your Legend is by default not refreshed after a table update (from the calendar). However, in some cases your Legend may have changed when your tables were updated, so you may like to check the Refresh Legend list after Update checkbox in order to refresh the legend list on the screen. Otherwise the legend will remain the same as before a table edit. |
| 4.4. | You may like to allow Inserts even if there is already a record on a date. In this case check the Allow inserts when a record exists on a date checkbox. Otherwise you will not be able to insert a record if the date is styled. |
| 4.5. | If you would like to support drag and drop on this calendar, then enter a Unique Drag ID (which should match your other calendars that you want to drag from and drop to). The Drag and Drop ID is populated with a default, but you can change this to a unique one if you'd like to. |
| 4.6. | If you are supporting Cut|Copy|Paste, then it's a good idea to use the Unique Drag ID for the Paste ID - in order to prevent mismatched pasting from the clipboard. |
| 4.7. | If you are supporting Cut|Copy|Paste and\or Drag and Drop, then you'll need to handcode a validation routine to avoid duplication occuring (Useful Tip: 11. Validating Paste and Dropped data entries). |
| 4.8. | Go to the Classes tab |
| 4.9. | Go to the Classes tab and set the Based on Class to PopupClass and the Popup Object Name to something unique and descriptive like ThisPopup1. |
| 1.1. | Open the Window Formatter for the window that you are wanting to add the Month Viewer to. |
| 1.2. | Select Populate - Control Template... from the menu. |
| 1.3. | Select the HotDates_MonthViewer template from the Control template list. |
| 1.4. | Click the top left corner for the group of controls to be
placed on the window. You will see 2 buttons in a Group and the legend controls. |
| 1.5. | Delete the controls that you don't require. You must leave the ?MonthViewGroup. |
| 1.6. | Right-click on one of the controls and select the Actions menu item. |
| 1.7. | Click on the Tables button. |
| 1.8. | Insert the files that will contain the data to populate on the Browse. If there is more than one table required to extricate the data, then use the one with the StartDate as the Primary file. This will also be the file which gets primed for update when we add the update buttons later. If you are using the HotDates_Colors table for your style-colors, then you need to add the HotDates_Colors table to your Other Tables. |
| 1.9. | You can also enter an optimum key to sort the table by. This should be a unique key (to obtain the correct record for updating). |
| 2.0. | Go to the Data tab. |
| 2.1. | Select the method by which the Data is stored (either a single date, a Date Range [i.e. FromDate-ToDate], a Date Duration or handcoded). |
| 2.2. | You'll need to enter a from date, an end date (for Date Ranges) and/or a date duration (for DateDuration) expression depending on the method that you selected in the 'Stored As' drop down. |
| 2.3. | If you're using a ToDate (end date) option, and your end dates may be blank, then you'll need to check the ToDate optional (infinite when 0). Otherwise the EndDate will be assumed to be correct at 0. |
| 2.4. | The Style entry needs to contain a field or expression for the style of the data on the view. Check out the Useful Tips on more possible uses. This Style ID is a numeric that references to the Style ID in the styles (or legends) setup on the Styles tab. |
| 2.5. | You can enter an expression to filter unwanted data in the Filter field. |
| 2.6. | To code a more indepth filter, you can use the Embeds, accessible via the Filter Embed button. For more details, check out the useful tips section on Coding Manual Filters |
| 2.7. | The Data to Display field will contain the field or expression to place the data in each item in the daylist in the month. |
| 2.8. | The ID of the Icon to display is used to tell HotDates which icon to place at the items entry in the daylist. This is probably initially disabled - and will be enabled after you've set the Icons up in the Icons tab. Similarly to the Style field, you can place a formula to obtain the correct icon ID. |
| 3.0. | Go to the Styles tab. Check out the Calendar Control template for help in setting up styles. |
| 4.0. | Go to the Icons Tab |
![]()
| 5.1. | The Date indicator is a numbered string that floats ontop of the date data box. You can set the Color, the proportional size (in relation to the ListBox), and the position (Vertical and Horizontal Orientation). The Today's Date Color field allows you to use a different color to highlight today's date on the calendar. You can leave this blank if you don't want Today's date to be highlighted. |
| 5.2. | The Heading in the Print group is the heading that will appear at the top of the MonthView printout. (Check FAQ 6.1. for more detail on how to print out the MonthView) |
| 5.3. | If the Year portion of date is irrelevant (i.e. this displays data like birthdays or anniversaries where data must not be filtered out where the year does not match the current year) then check this checkbox. |
| 5.4. | You can Enable Drill Down and enter a drill down procedure in the
Drill down procedure
drop list. This will enable a day/week/month to be expanded. If your drill
down procedure takes more than one parameter, then you can handcode the
call to the drill down using the Handcode Drill down call embed
button. You need to pass the clickdate property so that the receiving
procedure will display the correct start date. Example:
|
| 5.5. | The Drill Up follows the same principles as Drill Down (immediately above). |
| 5.6. | The Cell Tips section lets you set up cell tip information. You can leave this blank to omit cell tips. The field provided is a formula in which you can use fields from files in your HotDates tables. If you require the use of other fields (from tables that are not in the HotDates tables) - then you can use the Coded Lookups button to handcode into the embed. |
| 5.7. | If you have Replicate added to this application, then you will be able to Turn Replicate off during calendar loading. This is very useful if your HotDates view has a lot of data, and the calendar takes a long time to load. Please read the Clarion5.5 caveat in the FAQs. |
| 6.0. | Go to the Classes tab and set the Based on Class to MonthListClass and the Object Name to something unique and descriptive like ThisMonth1. |
Check out the Adding Update buttons to your Calendar/View to add update buttons to your Month View.
The WeeklyPlanner gives you a bit more scope to work with than the MonthView. The MonthView is a 2 dimensional - date and "activities", whereas the Weekly Planner is 3 dimensional - Date, "activities" and parent data. I guess the best would to show a pictoral example:
The left column contains the parent data (in this case the 'People'). Each of the Day columns to the right of that contains activities that pertain to that Person.
Your WeeklyPlanner procedure must be prototyped with at least a StartDate if you're using the Drill down/up functionality in HotDates:
WeeklyPlanner procedure (long pStartDate=0)
| 1.1. | Open the Window Formatter for the window that you are wanting to add the WeeklyPlanner to. |
| 1.2. | Select Populate - Control Template... from the menu. |
| 1.3. | Select the HotDates_Planner template from the Control template list. |
| 1.4. | Click the top left corner for the group of controls to be
placed on the window. You will see 2 buttons in a Group and the legend controls. |
| 1.5. | Delete the controls that you don't require. You must leave the ?Planner control. |
| 1.6. | Right-click on one of the controls and select the Actions menu item. |
| 1.7. | Click on the Tables button. |
| 1.8. | Insert the tables that will contain the data to populate on the Browse. You should make the Primary table the table that contains the data for the left column. You can attach a keyed order to the Primary table in order to sort the data. The table that contains the daily details data should be added to this tree as well. If you are using the HotDates_Colors table for your style-colors, then you need to add the HotDates_Colors table to your Other Tables. |
| 2.1. | On the General tab: |

| 3.2. | The Date Picture for Column Headers is the format in which the date must be displayed in the column heading (from column 2 onwards) |
| 3.3. | The Use American Date for abbreviated dates checkbox is used to format the date into American date order when an abbreviated date must be used in the column header because of space limitations. |
| 3.4. | Select the method by which the Data is stored (either a single date, a Date Range [i.e. FromDate-ToDate], a Date Duration or handcoded). |
| 3.5. | You'll need to enter a from date, an end date (for Date Ranges) and/or a date duration (for DateDuration) expression depending on the method that you selected in the 'Stored As' drop down. |
| 3.6. | If you're using a ToDate (end date) option, and your end dates may be blank, then you'll need to check the ToDate optional (infinite when 0). Otherwise the EndDate will be assumed to be correct at 0. |
| 3.7. | The Style entry needs to contain a field or expression for the style of the data on the view. Check out the Useful Tips on more possible uses. This Style ID is a numeric that references to the Style ID in the styles (or legends) setup on the Styles tab. |
| 3.8. | You can enter an expression to filter unwanted data in the Filter field. |
| 3.9. | The Data to Display field will contain the field or expression to place the data in each item in the row. |
| 3.10. | The ID of the Icon to display is used to tell HotDates which icon to place at the items entry in the row. This is probably initially disabled - and will be enabled after you've set the Icons up in the Icons tab. Similarly to the Style field, you can place a formula to obtain the correct icon ID. |
| 3.11. | The default Heading Justification drop down can be used to select an alternative justification for the column headers. Force to Left, Center, Right - or use the default. |
| 4.1. | Go to the Queue tab. |

| 4.2. | You can sort the child data cells (in the rows) in 3 possible orders - by the order that is in the Legend, in the DisplayData order (which is simply sorted by string), or in a customizable order (Other). |
| 4.3. | If you selected Other in the Row Data Ordered by drop
down list, then you can enter a manual sort order in the embed provided.
Your primary sort fields, must always be those used in the left column,
and then in specific child fields. For example:
sort(DatesQueue:1,DatesQueue:1.PEO:PeopleID,DatesQueue:1.TAS:TaskTime) |
| 4.4. | If you are coding a manual filter (for populating data from the template generated queue to the planner queue) - then you need to add the fields to the template queue that you will use in the filter. These will be the file fields, but in the coded filter, you must use their queue field equivalents. |
| 4.5. | To code a more indepth filter, you can use the Embeds, accessible via the Filter Embed button. For more details, check out the useful tips section on Coding Manual Filters |
| 5.1 | Go to the Styles tab. Check out the Calendar Control template for help in setting up styles. |
| 6.1. | Go to the Icons Tab. |