Anonymous_User Absent Member.
Absent Member.
1487 views

adding an appointment to a subcalendar

G'day all.
We use GW7.0.2 and I'm using VS.NET2005 for creating my app. Through the gw
object api I'm able to add an (personal) appointment to the calendar. This
appointment is displayed, using the Windows client, as expected in the
user's calendar. Then I added a sub calendar to the rootcalendar and added
an appointment using the Windows client. The appointment is only visible in
the sub-calendar and not in de rootcalendar. However if I add an appointment
to a sub-calendar using the object api it is displayed in the sub calendar
and the root calendar. Why? Perhaps I'm missing something in my code. Any
idea's?

Cheers,
Frank

_______________________________
Calling form
<skipped the login part and some declarations>

Dim gwFolder As GroupwareTypeLibrary.Folder6
Dim gwAppointment As GroupwareTypeLibrary.Appointment9

''set the correct folder
gwFolder = GWRootAccount.Calendar.Folders.Item(1)

''add the appointment
gwAppointment = GWCalls.Add_Personal_Appointment(gwFolder, "Subject",
"Body", "Place", Date.Now, DateAdd(DateInterval.Hour, 6, Date.Now))

If gwAppointment Is Nothing Then
''failed to add the appointment
MsgBox("Adding of appointment failed", MsgBoxStyle.Critical)
Else
MsgBox(gwAppointment.MessageID)
End If



_______________________________
Class form (GWCalls)

Public Function Add_Personal_Appointment(ByRef Folder As
GroupwareTypeLibrary.Folder6, _
ByVal Subject As String, _
ByVal Bodytext As String, _
ByVal Place As String, _
ByVal StartDate As Date, _
ByVal EndDate As Date) As
GroupwareTypeLibrary.Appointment9

Dim _gwAppointment As GroupwareTypeLibrary.Appointment9 = Nothing
Dim _gwMessages As GroupwareTypeLibrary.Messages = Nothing

Try
_gwMessages = Folder.Messages
_gwAppointment = _gwMessages.Add("GW.MESSAGE.APPOINTMENT", 3)

With _gwAppointment
.BodyText.PlainText = Bodytext
.Subject.PlainText = Subject
.StartDate = StartDate
.EndDate = EndDate
.Place = Place
.FromText = Folder.Owner.DisplayName
.Refresh()
End With
Catch ex As Exception
ShowError(ex)
_gwAppointment = Nothing
End Try

Return _gwAppointment

End Function






Labels (1)
0 Likes
5 Replies
Anonymous_User Absent Member.
Absent Member.

Re: adding an appointment to a subcalendar

The folders have an option to be included in the search of calendar items.
Normally all calendar items in all folders will display when you get the
items
in the Calendar folder.
The Calendar folder is a special folder. It is a container folder (items can
be
physically in the folder) and a query folder.

We don't expose the ability to not include the sub calendar folders until
Bonsai:
Folder.ShowInMainCalendar. This feature will not be ported back to 7.0.x.

But that is probably not what you are saying here.
Are you saying that if you put the item in the sub calendar it shows up
in the Calendar folder and the sub calendar folder as viewed by the
GWClient?
If so, what folder does the item say that it is in. (In the column headers
add
Folder as a column in the details view.

Preston

>>> On Wednesday, May 14, 2008 at 1:23 PM, Frank

Peters<frank.peters@dtzc.nl>
wrote:
> G'day all.
> We use GW7.0.2 and I'm using VS.NET2005 for creating my app. Through the

gw
> object api I'm able to add an (personal) appointment to the calendar. This


> appointment is displayed, using the Windows client, as expected in the
> user's calendar. Then I added a sub calendar to the rootcalendar and added


> an appointment using the Windows client. The appointment is only visible

in
> the sub-calendar and not in de rootcalendar. However if I add an

appointment
> to a sub-calendar using the object api it is displayed in the sub calendar


> and the root calendar. Why? Perhaps I'm missing something in my code. Any


> idea's?
>
> Cheers,
> Frank
>
> _______________________________
> Calling form
> <skipped the login part and some declarations>
>
> Dim gwFolder As GroupwareTypeLibrary.Folder6
> Dim gwAppointment As GroupwareTypeLibrary.Appointment9
>
> ''set the correct folder
> gwFolder = GWRootAccount.Calendar.Folders.Item(1)
>
> ''add the appointment
> gwAppointment = GWCalls.Add_Personal_Appointment(gwFolder, "Subject",
> "Body", "Place", Date.Now, DateAdd(DateInterval.Hour, 6, Date.Now))
>
> If gwAppointment Is Nothing Then
> ''failed to add the appointment
> MsgBox("Adding of appointment failed", MsgBoxStyle.Critical)
> Else
> MsgBox(gwAppointment.MessageID)
> End If
>
>
>
> _______________________________
> Class form (GWCalls)
>
> Public Function Add_Personal_Appointment(ByRef Folder As
> GroupwareTypeLibrary.Folder6, _
> ByVal Subject As String, _
> ByVal Bodytext As String, _
> ByVal Place As String, _
> ByVal StartDate As Date, _
> ByVal EndDate As Date) As
> GroupwareTypeLibrary.Appointment9
>
> Dim _gwAppointment As GroupwareTypeLibrary.Appointment9 = Nothing
> Dim _gwMessages As GroupwareTypeLibrary.Messages = Nothing
>
> Try
> _gwMessages = Folder.Messages
> _gwAppointment = _gwMessages.Add("GW.MESSAGE.APPOINTMENT", 3)
>
> With _gwAppointment
> .BodyText.PlainText = Bodytext
> .Subject.PlainText = Subject
> .StartDate = StartDate
> .EndDate = EndDate
> .Place = Place
> .FromText = Folder.Owner.DisplayName
> .Refresh()
> End With
> Catch ex As Exception
> ShowError(ex)
> _gwAppointment = Nothing
> End Try
>
> Return _gwAppointment
>
> End Function

0 Likes
Anonymous_User Absent Member.
Absent Member.

Betr.: Re: adding an appointment to a subcalendar

Preston,
the item claims to be in both folders.

Frank


>>> Preston Stephenson<PStephenson@gw.novell.com> 14-5-2008 22:41 >>>

The folders have an option to be included in the search of calendar items.
Normally all calendar items in all folders will display when you get the
items
in the Calendar folder.
The Calendar folder is a special folder. It is a container folder (items can
be
physically in the folder) and a query folder.

We don't expose the ability to not include the sub calendar folders until
Bonsai:
Folder.ShowInMainCalendar. This feature will not be ported back to 7.0.x.

But that is probably not what you are saying here.
Are you saying that if you put the item in the sub calendar it shows up
in the Calendar folder and the sub calendar folder as viewed by the
GWClient?
If so, what folder does the item say that it is in. (In the column headers
add
Folder as a column in the details view.

Preston


>>> On Wednesday, May 14, 2008 at 1:23 PM, Frank

Peters<frank.peters@dtzc.nl>
wrote:

> G'day all.
> We use GW7.0.2 and I'm using VS.NET2005 for creating my app. Through the

gw

> object api I'm able to add an (personal) appointment to the calendar. This



> appointment is displayed, using the Windows client, as expected in the
> user's calendar. Then I added a sub calendar to the rootcalendar and added



> an appointment using the Windows client. The appointment is only visible

in

> the sub-calendar and not in de rootcalendar. However if I add an

appointment

> to a sub-calendar using the object api it is displayed in the sub calendar



> and the root calendar. Why? Perhaps I'm missing something in my code. Any



> idea's?
>
> Cheers,
> Frank
>
> _______________________________
> Calling form
> <skipped the login part and some declarations>
>
> Dim gwFolder As GroupwareTypeLibrary.Folder6
> Dim gwAppointment As GroupwareTypeLibrary.Appointment9
>
> ''set the correct folder
> gwFolder = GWRootAccount.Calendar.Folders.Item(1)
>
> ''add the appointment
> gwAppointment = GWCalls.Add_Personal_Appointment(gwFolder, "Subject",
> "Body", "Place", Date.Now, DateAdd(DateInterval.Hour, 6, Date.Now))
>
> If gwAppointment Is Nothing Then
> ''failed to add the appointment
> MsgBox("Adding of appointment failed", MsgBoxStyle.Critical)
> Else
> MsgBox(gwAppointment.MessageID)
> End If
>
>
>
> _______________________________
> Class form (GWCalls)
>
> Public Function Add_Personal_Appointment(ByRef Folder As
> GroupwareTypeLibrary.Folder6, _
> ByVal Subject As String, _
> ByVal Bodytext As String, _
> ByVal Place As String, _
> ByVal StartDate As Date, _
> ByVal EndDate As Date) As
> GroupwareTypeLibrary.Appointment9
>
> Dim _gwAppointment As GroupwareTypeLibrary.Appointment9 = Nothing
> Dim _gwMessages As GroupwareTypeLibrary.Messages = Nothing
>
> Try
> _gwMessages = Folder.Messages
> _gwAppointment = _gwMessages.Add("GW.MESSAGE.APPOINTMENT", 3)
>
> With _gwAppointment
> .BodyText.PlainText = Bodytext
> .Subject.PlainText = Subject
> .StartDate = StartDate
> .EndDate = EndDate
> .Place = Place
> .FromText = Folder.Owner.DisplayName
> .Refresh()
> End With
> Catch ex As Exception
> ShowError(ex)
> _gwAppointment = Nothing
> End Try
>
> Return _gwAppointment
>
> End Function
0 Likes
Anonymous_User Absent Member.
Absent Member.

Betr.: Re: adding an appointment to a subcalendar

You would then have to determine when and hour it got added to
both folders.

Preston

>>> On Friday, May 16, 2008 at 12:54 AM, Frank Peters<frank.peters@dtzc.nl>

wrote:
> Preston,
> the item claims to be in both folders.
>
> Frank
>
>>>> Preston Stephenson<PStephenson@gw.novell.com> 14-5-2008 22:41 >>>

> The folders have an option to be included in the search of calendar

items.
> Normally all calendar items in all folders will display when you get the
> items
> in the Calendar folder.
> The Calendar folder is a special folder. It is a container folder (items

can
> be
> physically in the folder) and a query folder.
>
> We don't expose the ability to not include the sub calendar folders until
> Bonsai:
> Folder.ShowInMainCalendar. This feature will not be ported back to 7.0.x.
>
> But that is probably not what you are saying here.
> Are you saying that if you put the item in the sub calendar it shows up
> in the Calendar folder and the sub calendar folder as viewed by the
> GWClient?
> If so, what folder does the item say that it is in. (In the column

headers
> add
> Folder as a column in the details view.
>
> Preston
>
>>>> On Wednesday, May 14, 2008 at 1:23 PM, Frank

> Peters<frank.peters@dtzc.nl>
> wrote:
>> G'day all.
>> We use GW7.0.2 and I'm using VS.NET2005 for creating my app. Through the

> gw
>> object api I'm able to add an (personal) appointment to the calendar.

This
>
>> appointment is displayed, using the Windows client, as expected in the
>> user's calendar. Then I added a sub calendar to the rootcalendar and

added
>
>> an appointment using the Windows client. The appointment is only visible

> in
>> the sub-calendar and not in de rootcalendar. However if I add an

> appointment
>> to a sub-calendar using the object api it is displayed in the sub

calendar
>
>> and the root calendar. Why? Perhaps I'm missing something in my code.

Any
>
>> idea's?
>>
>> Cheers,
>> Frank
>>
>> _______________________________
>> Calling form
>> <skipped the login part and some declarations>
>>
>> Dim gwFolder As GroupwareTypeLibrary.Folder6
>> Dim gwAppointment As GroupwareTypeLibrary.Appointment9
>>
>> ''set the correct folder
>> gwFolder = GWRootAccount.Calendar.Folders.Item(1)
>>
>> ''add the appointment
>> gwAppointment = GWCalls.Add_Personal_Appointment(gwFolder, "Subject",
>> "Body", "Place", Date.Now, DateAdd(DateInterval.Hour, 6, Date.Now))
>>
>> If gwAppointment Is Nothing Then
>> ''failed to add the appointment
>> MsgBox("Adding of appointment failed", MsgBoxStyle.Critical)
>> Else
>> MsgBox(gwAppointment.MessageID)
>> End If
>>
>>
>>
>> _______________________________
>> Class form (GWCalls)
>>
>> Public Function Add_Personal_Appointment(ByRef Folder As
>> GroupwareTypeLibrary.Folder6, _
>> ByVal Subject As String, _
>> ByVal Bodytext As String, _
>> ByVal Place As String, _
>> ByVal StartDate As Date, _
>> ByVal EndDate As Date) As
>> GroupwareTypeLibrary.Appointment9
>>
>> Dim _gwAppointment As GroupwareTypeLibrary.Appointment9 =

Nothing
>> Dim _gwMessages As GroupwareTypeLibrary.Messages = Nothing
>>
>> Try
>> _gwMessages = Folder.Messages
>> _gwAppointment = _gwMessages.Add("GW.MESSAGE.APPOINTMENT",

3)
>>
>> With _gwAppointment
>> .BodyText.PlainText = Bodytext
>> .Subject.PlainText = Subject
>> .StartDate = StartDate
>> .EndDate = EndDate
>> .Place = Place
>> .FromText = Folder.Owner.DisplayName
>> .Refresh()
>> End With
>> Catch ex As Exception
>> ShowError(ex)
>> _gwAppointment = Nothing
>> End Try
>>
>> Return _gwAppointment
>>
>> End Function

0 Likes
Anonymous_User Absent Member.
Absent Member.

Betr.: Re: adding an appointment to a subcalendar

Preston.
Did you look at the source code I added? I don't see what is wrong.

Cheers,
Frank


>>> Preston Stephenson<PStephenson@gw.novell.com> 16-5-2008 15:02 >>>

You would then have to determine when and hour it got added to
both folders.

Preston


>>> On Friday, May 16, 2008 at 12:54 AM, Frank Peters<frank.peters@dtzc.nl>

wrote:

> Preston,
> the item claims to be in both folders.
>
> Frank
>

>>>> Preston Stephenson<PStephenson@gw.novell.com> 14-5-2008 22:41 >>>

> The folders have an option to be included in the search of calendar

items.

> Normally all calendar items in all folders will display when you get the
> items
> in the Calendar folder.
> The Calendar folder is a special folder. It is a container folder (items

can

> be
> physically in the folder) and a query folder.
>
> We don't expose the ability to not include the sub calendar folders until
> Bonsai:
> Folder.ShowInMainCalendar. This feature will not be ported back to 7.0.x.
>
> But that is probably not what you are saying here.
> Are you saying that if you put the item in the sub calendar it shows up
> in the Calendar folder and the sub calendar folder as viewed by the
> GWClient?
> If so, what folder does the item say that it is in. (In the column

headers

> add
> Folder as a column in the details view.
>
> Preston
>

>>>> On Wednesday, May 14, 2008 at 1:23 PM, Frank

> Peters<frank.peters@dtzc.nl>
> wrote:

>> G'day all.
>> We use GW7.0.2 and I'm using VS.NET2005 for creating my app. Through the

> gw

>> object api I'm able to add an (personal) appointment to the calendar.

This

>

>> appointment is displayed, using the Windows client, as expected in the
>> user's calendar. Then I added a sub calendar to the rootcalendar and

added

>

>> an appointment using the Windows client. The appointment is only visible

> in

>> the sub-calendar and not in de rootcalendar. However if I add an

> appointment

>> to a sub-calendar using the object api it is displayed in the sub

calendar

>

>> and the root calendar. Why? Perhaps I'm missing something in my code.

Any

>

>> idea's?
>>
>> Cheers,
>> Frank
>>
>> _______________________________
>> Calling form
>> <skipped the login part and some declarations>
>>
>> Dim gwFolder As GroupwareTypeLibrary.Folder6
>> Dim gwAppointment As GroupwareTypeLibrary.Appointment9
>>
>> ''set the correct folder
>> gwFolder = GWRootAccount.Calendar.Folders.Item(1)
>>
>> ''add the appointment
>> gwAppointment = GWCalls.Add_Personal_Appointment(gwFolder, "Subject",
>> "Body", "Place", Date.Now, DateAdd(DateInterval.Hour, 6, Date.Now))
>>
>> If gwAppointment Is Nothing Then
>> ''failed to add the appointment
>> MsgBox("Adding of appointment failed", MsgBoxStyle.Critical)
>> Else
>> MsgBox(gwAppointment.MessageID)
>> End If
>>
>>
>>
>> _______________________________
>> Class form (GWCalls)
>>
>> Public Function Add_Personal_Appointment(ByRef Folder As
>> GroupwareTypeLibrary.Folder6, _
>> ByVal Subject As String, _
>> ByVal Bodytext As String, _
>> ByVal Place As String, _
>> ByVal StartDate As Date, _
>> ByVal EndDate As Date) As
>> GroupwareTypeLibrary.Appointment9
>>
>> Dim _gwAppointment As GroupwareTypeLibrary.Appointment9 =

Nothing

>> Dim _gwMessages As GroupwareTypeLibrary.Messages = Nothing
>>
>> Try
>> _gwMessages = Folder.Messages
>> _gwAppointment = _gwMessages.Add("GW.MESSAGE.APPOINTMENT",

3)

>>
>> With _gwAppointment
>> .BodyText.PlainText = Bodytext
>> .Subject.PlainText = Subject
>> .StartDate = StartDate
>> .EndDate = EndDate
>> .Place = Place
>> .FromText = Folder.Owner.DisplayName
>> .Refresh()
>> End With
>> Catch ex As Exception
>> ShowError(ex)
>> _gwAppointment = Nothing
>> End Try
>>
>> Return _gwAppointment
>>
>> End Function
0 Likes
Anonymous_User Absent Member.
Absent Member.

Betr.: Re: adding an appointment to a subcalendar

The code looked straight forward, but I haven't tried the code.

Preston

>>> On Friday, May 16, 2008 at 12:46 PM, Frank Peters<frank.peters@dtzc.nl>

wrote:
> Preston.
> Did you look at the source code I added? I don't see what is wrong.
>
> Cheers,
> Frank
>
>>>> Preston Stephenson<PStephenson@gw.novell.com> 16-5-2008 15:02 >>>

> You would then have to determine when and hour it got added to
> both folders.
>
> Preston
>
>>>> On Friday, May 16, 2008 at 12:54 AM, Frank

Peters<frank.peters@dtzc.nl>
> wrote:
>> Preston,
>> the item claims to be in both folders.
>>
>> Frank
>>
>>>>> Preston Stephenson<PStephenson@gw.novell.com> 14-5-2008 22:41 >>>

>> The folders have an option to be included in the search of calendar

> items.
>> Normally all calendar items in all folders will display when you get the
>> items
>> in the Calendar folder.
>> The Calendar folder is a special folder. It is a container folder (items

> can
>> be
>> physically in the folder) and a query folder.
>>
>> We don't expose the ability to not include the sub calendar folders

until
>> Bonsai:
>> Folder.ShowInMainCalendar. This feature will not be ported back to

7.0.x.
>>
>> But that is probably not what you are saying here.
>> Are you saying that if you put the item in the sub calendar it shows up
>> in the Calendar folder and the sub calendar folder as viewed by the
>> GWClient?
>> If so, what folder does the item say that it is in. (In the column

> headers
>> add
>> Folder as a column in the details view.
>>
>> Preston
>>
>>>>> On Wednesday, May 14, 2008 at 1:23 PM, Frank

>> Peters<frank.peters@dtzc.nl>
>> wrote:
>>> G'day all.
>>> We use GW7.0.2 and I'm using VS.NET2005 for creating my app. Through

the
>> gw
>>> object api I'm able to add an (personal) appointment to the calendar.

> This
>>
>>> appointment is displayed, using the Windows client, as expected in the
>>> user's calendar. Then I added a sub calendar to the rootcalendar and

> added
>>
>>> an appointment using the Windows client. The appointment is only

visible
>> in
>>> the sub-calendar and not in de rootcalendar. However if I add an

>> appointment
>>> to a sub-calendar using the object api it is displayed in the sub

> calendar
>>
>>> and the root calendar. Why? Perhaps I'm missing something in my code.

> Any
>>
>>> idea's?
>>>
>>> Cheers,
>>> Frank
>>>
>>> _______________________________
>>> Calling form
>>> <skipped the login part and some declarations>
>>>
>>> Dim gwFolder As GroupwareTypeLibrary.Folder6
>>> Dim gwAppointment As GroupwareTypeLibrary.Appointment9
>>>
>>> ''set the correct folder
>>> gwFolder = GWRootAccount.Calendar.Folders.Item(1)
>>>
>>> ''add the appointment
>>> gwAppointment = GWCalls.Add_Personal_Appointment(gwFolder, "Subject",
>>> "Body", "Place", Date.Now, DateAdd(DateInterval.Hour, 6, Date.Now))
>>>
>>> If gwAppointment Is Nothing Then
>>> ''failed to add the appointment
>>> MsgBox("Adding of appointment failed", MsgBoxStyle.Critical)
>>> Else
>>> MsgBox(gwAppointment.MessageID)
>>> End If
>>>
>>>
>>>
>>> _______________________________
>>> Class form (GWCalls)
>>>
>>> Public Function Add_Personal_Appointment(ByRef Folder As
>>> GroupwareTypeLibrary.Folder6, _
>>> ByVal Subject As String, _
>>> ByVal Bodytext As String,

_
>>> ByVal Place As String, _
>>> ByVal StartDate As Date, _
>>> ByVal EndDate As Date) As
>>> GroupwareTypeLibrary.Appointment9
>>>
>>> Dim _gwAppointment As GroupwareTypeLibrary.Appointment9 =

> Nothing
>>> Dim _gwMessages As GroupwareTypeLibrary.Messages = Nothing
>>>
>>> Try
>>> _gwMessages = Folder.Messages
>>> _gwAppointment = _gwMessages.Add("GW.MESSAGE.APPOINTMENT",

> 3)
>>>
>>> With _gwAppointment
>>> .BodyText.PlainText = Bodytext
>>> .Subject.PlainText = Subject
>>> .StartDate = StartDate
>>> .EndDate = EndDate
>>> .Place = Place
>>> .FromText = Folder.Owner.DisplayName
>>> .Refresh()
>>> End With
>>> Catch ex As Exception
>>> ShowError(ex)
>>> _gwAppointment = Nothing
>>> End Try
>>>
>>> Return _gwAppointment
>>>
>>> End Function

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.