ToDo items in Calendar view

I am using the Notes COM Toolkit and C#.

When I run the following code:
         notesView = notesDatabase.GetView("Calendar");
notesView conatins the ToDo items as well.

Is there a way to only get the Calendar items in one view and the ToDo items in another view?  Or do I have to filter this view based on properties they don't share?

jlalandeAsked:
Who is Participating?
 
Sjef BosmanConnect With a Mentor Groupware ConsultantCommented:
What if you open the Meetings view? Or the Tasks view?
0
 
jlalandeAuthor Commented:
conatins = contains

Stupid fingers...
0
 
marilyngCommented:
There is a preference you set on the database to exclude todo items in the calendar view.  By default the value is unchecked.

OPen the database. Open calendar select Tools>>Preferences.  Then click on the Calendar and ToDO tab, then ToDo tab.  You will the property to check.

Or you can filter by form and exclude those with the field: Form not equal to "Task"
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
jlalandeAuthor Commented:
It looks like I will have to filter because I will not know if the database has this preference unset.
0
 
jlalandeAuthor Commented:
This setting could be set or unset on a database.  Is it possible to detect this setting?  If it is set to exclude ToDo items, is there a way to get a view object containing only the ToDo items?
0
 
marilyngConnect With a Mentor Commented:
I'm guessing you are unfamiliar with the Notes Designer client?  YOu can open a database in designer to see it's elements, use NotesPeek, or do File>>Database>>Design Synopsis  There are many todo and calendar views:


Name:      (CalSummary)
Alias:      CalSummary
            
Name:      (To do's\By Category)
Alias:      TodoByCategory
            
Name:      (To do's\Completed)
Alias:      TodoCompleted
            
Name:      (To Do's\Group)
Alias:      ToDoGroup
            
Name:      (To do's\Incomplete)
Alias:      TodoByStatus
            
Name:      (To do's\Personal)
Alias:      TodoPersonal

----------
To detect the setting, you would query the user's preferences in the database: (this is a form, called a profile document)

Name:      (Calendar Profile)
Alias:      CalendarProfile

HideToDosFromCalendar ="0" or "1"
0
 
marilyngCommented:
sjef, what are you talking about? :)
0
 
Sjef BosmanGroupware ConsultantCommented:
Oops, I obviously didn't see your reply... :-$ Ssssooooo sssssooorry

Hah, but those two views you didn't mention!
0
 
jlalandeAuthor Commented:
Oh my....every answer opens up 10 more questions.
marilyng, not only am I unfamiliar with the Notes Designer client, I am unfamiliar with Notes.  I cannot remember being so befuddled with a software product.
I now have Designer installed.
How do I retrieve the CalendarProfile document programatically?
Ideally, I would like two separate views (one for ToDos and the other for Calender items) no matter what the HideToDosFromCalendar setting is.  Is this possible?
0
 
Sjef BosmanGroupware ConsultantCommented:
jlalande,
> I am unfamiliar with Notes
Like: I know nothing about cars but I they asked me to create spark plugs for a Diesel?

If you have the Designer, then you might also have the Designer Manuals (books or database). Read all books twice, also read a book about the concepts of the Domino server, so you understand what it's all about. This isn't meant as criticism, but you need a more solid background than just the Domino Object Model to work with Notes and Domino. For the time being, do the digging into the Designer only when you have the time, and ask very direct questions here.

The views I mentioned might be the ones you need.
0
 
jlalandeAuthor Commented:
sjef_bosman
You have a good point.  And I don't take it as criticism.  This has been the project from hell from day one.  I was given three weeks to complete this project and I have spent almost that long just spinning wheels.

BTW, a diesel doesn't have spark plugs.  ;)
0
 
marilyngCommented:
How do I retrieve the CalendarProfile document programatically?<<

Ideally, I would like two separate views (one for ToDos and the other for Calender items) no matter what the HideToDosFromCalendar setting is.  Is this possible?<<

First tell me what your goal is, where to you want to end up?  and is this for one or many users?
0
 
Sjef BosmanGroupware ConsultantCommented:
jlalande,
> BTW, a diesel doesn't have spark plugs.  ;)
You knew!? Just testing... LOL

Anyway, an accasional peek in the Designer won't hurt, opening views and looking at columns etc. Accessible field names you can usually find in the Notes client, with the Document Properties window. But I suppose you already use that "technique". If you want to access hidden views in the Notes client, hold Ctrl and Shift, then click on View/Go to.
0
 
jlalandeAuthor Commented:
Yeah, I knew.  It appears I know a little more about cars than I do Notes.

I closed this question because sjef_bosman gave me the two views I need.  However, I got the "assisted answer" and "accepted" answer backward and have requested that they be changed.

But just to complete the topic, the answer to marilyng's question is that my goal is to create a data structure of the Notes documents for Contact, Email, Journal, ToDo, and Calendar items so that I can index these items using dtSearch.  I could simply get the Calendar view and iterate through the documents populating my ToDo and Calendar lists by testing each document encountered.  However, I am implementing my lists as custom collections that wrap a view.  That way, there's no in-memory representation of a document until the client of the custom collection calls MoveNext.  Having two distinct views each with its own custom collection implementation is less complex than one view shared by two custom collections with different behaviour depending on a database setting.
This is for a single user (well, hopefully many single users).

Thanks for your help, marilyng and sjef_bosman.
0
 
marilyngCommented:
Hey, all i did was grab the File>>Database>>design Synopsis and check of the todo and calendar views that I saw listed.  Musta been dark because I missed a few.

there is one calendar profile in each database that is set for a specific user, the owner of the mail file.

Use the getprofiledocument(?) of the Database Class to grab the database profile.

Dim profiledoc as NotesDocument
set profiledoc = db.getprofiledocument("calendarprofile", theusername)

Can provide more when I'm on a notes machine.


0
 
Sjef BosmanGroupware ConsultantCommented:
Actually, theusername isn't used. From the (Preferences) agent in a mail database:
    Set m_calprofile = db.GetProfileDocument("CalendarProfile")
0
 
marilyngCommented:
Either is correct: Set notesDocument = notesDatabase.GetProfileDocument( profilename$ [, uniqueKey$ ] )

I remember that when I did notespeek on a couple of databases, there were a multiple profile documents stored, but I couldn't remember if these were for calendar profile or another profile document.  I see now these are for "calendar settings", so if you were going to collect the calendar settings for everyone having permission to the user's calendar, then you'd need to specify which user's profile document.

The preferences agent in the  mail file assumes there is only one profile document and that the user is opening that profile document, so sjef is correct that you don't need to specify the name for the calendarprofile.

Here is the complete list:
Name:      (To do's\By Category)
Alias:      TodoByCategory
            
Name:      (To do's\Completed)
Alias:      TodoCompleted
            
Name:      (To Do's\Group)
Alias:      ToDoGroup
            
Name:      (To do's\Incomplete)
Alias:      TodoByStatus
            
Name:      (To do's\Personal)
Alias:      TodoPersonal
            
Name:      ($Calendar)
Alias:      Calendar
            
Name:      ($Meetings By Category)
Alias:      MeetingsByCategory
            
Name:      ($Meetings By Month)
Alias:      MeetingsByMonth
            
Name:      ($Meetings)
Alias:      Meetings
            
Name:      ($ToDo)
Alias:      Tasks

But as sjef says, in order to know what you're collecting, you need to look at these with some data in them from designer and see what fields and columns make up the views.
0
All Courses

From novice to tech pro — start learning today.