Solved

need calender view in a non-mail database

Posted on 2002-06-10
6
190 Views
Last Modified: 2013-12-18
hi,

i have a database with a blanc design. alle new elements are not related to a mail database at all.

one form contains a document about a person including the birthday.

i'd like to have a web-view similar or same to the one in the mail template to see all birthday entries of all persons.


tasks:
1) i'd like to know which minimum (and if needed how) design elements i need to copy from a mail template to see the notes (viewd by a browser) calender in the web.
the bithday entries in the calender can be made by a notes client, if it's more easy.
problem: the copied design elements shouldn't be larger that about 1.5 mb.

if there are other templates / design elements i can use than form the original mail template it'd be also ok.


2) ideal would be to have an agent that looks in the documents where the birthday is entered (field birthday)
an writing it into the calender.
if this taks (2) is also answered by you, i'll increase the points by 100.
0
Comment
Question by:hreinart
  • 2
  • 2
  • 2
6 Comments
 
LVL 4

Expert Comment

by:sloeber
ID: 7067238
Creating a calendar view  

In a calendar view, documents that are created using a form designed for scheduling individual meetings, appointments, events,birthdays and the like, display as entries on a calendar. It is best to create the form first, and then create the calendar view to display the documents created using the form.
To create a calendar view, you begin by creating a standard view. You can either complete Steps 1 through 10 for creating a standard view  or you can convert an existing view to a calendar view.
  1.     Create a new view or open an existing view.
  2.     Open the View Properties box.
  3.     In the Style field, select Calendar. A dialog box appears. Click yes to continue.
The first column of a calendar view defines the Date/Time the entry will display and should be hidden.
  4.     Click the first column. In the Column properties box, check Hide column.
  5.     In the Programmer's pane, choose one of the following and enter a value for the first column that will evaluate to both a date and time:
Simple function - Select a value from the list that evaluates to a date and time, for example, creation date.
Field - This displays a list of all the fields in the database. Select a date/time field from the form you will use with the calendar view.
Formula - Write a formula in the Programmer's pane that evaluates to a date and time.
  6.     Open the Column properties box and click the Sorting tab . Choose the sort option Ascending.
Note  If you have a field on your form that allows multiple values, and you want each value to display as separate entries in the calendar view, select the column sorting option "Show multiple values as separate entries" for the first column.  For example, the Mail template uses this technique for displaying repeating events. Otherwise, the entries display under the first matching date only.
  7.     Click the Date and Time tab  of the Column properties box and select Date and time.
The second column of a calendar view defines duration of the entry and should be hidden.
  8.     Create a second column or click  the second column of the existing view. The second column must map to a field or formula on the document that specifies, in minutes, the duration of the event. In the Column properties box, check Hide column.
  9.     Create a selection formula  for the view that will select the documents to be displayed in the calendar view, for example, _Calendar Entry.
Formatting options for calendar views
Once you have created a calendar view, you can format it.
Click the Date and Time format tab  of the View properties box. The Date and Time format tab appears only when Calendar is selected for the view style. On the Date and Time tab you have the following display options.
Calendar formats available to users
Each box checked will display an icon that lets the user change the calendar view format. For example, if you want to give the user the choice to view the calendar in a one month format or a 1 day format, check those two options.
Initial format
Let you choose which format displays to the user upon first opening the view.
Time slot display available to users
A time slot is a graphical display of time periods in the view. If Time slot display is checked, time slots appear in the view. If you select this option then you must choose a start and end time for the time slots as well as the duration (how wide the time slots should be, for example, 1 hour. If you select the option "Users may override these times,"  the user's Notes client calendar preference determines how time slots are displayed in the calendar.
0
 
LVL 4

Expert Comment

by:sloeber
ID: 7067252
You have already a form with a birthday field (date /time).
The second thing you need to do is make an extra hidden field, for example CalendarView (Number) which is computed when composed and has as value 1.
This second field is necessary,for your calendar view, where the second colum is the duration of the event, and has now the value of 1.
You first column is yor birthday field, that's all you need to do ,to have a working calendar view.
PS : don't forget to change the view type to Calendar

If you need extra information, just let me know.
0
 
LVL 8

Accepted Solution

by:
Jean Marie Geeraerts earned 150 total points
ID: 7069213
It's actually a bit simpler than this, hreinart.

On your birthday form you need at least the following fields:
- DateOfBirth : a date/time field to hold the person's date of birth
- NextBirthDay: a date/time field to hold the person's next birthday. This field is computed using the following formula:
newDate:=@Date(@Year(@Today); @Month(DateOfBirth); @Day(DateOfBirth));
@if(@IsError(newDate); "";
   @if(newDate>@Today;
      newDate;
      @Date(@Year(@Today)+1; @Month(DateOfBirth); @Day(DateOfBirth))
   )
);
- Name: a text or names field to hold the person's name
You can include any additional fields you like, but these are the minimum required fields.
There's no field for duration required, we can use a computed column in the view for this.

Now create your calendar view. As sloeber mentioned, you specify in the view properties that this is to be a calendar view.
First column: hidden, sorted ascending, NextBirthDay field
Second column : hidden, formula: 1 (just the value 1)
Third column : sorted ascending, Name field to display the name of the person on your calendar

That's it. If you look at the view now you will see all the birthdays you entered.

Now to update this view every year, you need to write an agent that updates the NextBirthDay fields on all birthday documents.
Schedule this agent to run daily on all documents in the database or on all documents where NextBirthDate<@Today (the latter if there are many documents, you can use this to limit the number of documents to be processed)
Let the agent execute the following formula:
newDate:=@Date(@Year(@Today); @Month(DateOfBirth); @Day(DateOfBirth));
FIELD NextBirthDay:=@if(@IsError(newDate); "";
   @if(newDate>@Today;
      newDate;
      @Date(@Year(@Today)+1; @Month(DateOfBirth); @Day(DateOfBirth))
   )
);

I'll send you a little sample database you can play around with.
Regards,
JM
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:hreinart
ID: 7083317
increased points
0
 

Author Comment

by:hreinart
ID: 7083321
hi,

the solution from jerrith is really most easy to use.
it's working fine. thanks a lot.

0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7083418
You're welcome.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now