/ Forums / Advansys Formativ / Creating Solutions with Formativ / New appointment registered as “free” – did I miss something?

  • Creator
    Topic
  • #4314
    dgerisch
    Participant

    I have an applet that calls a subroutine to send an appointment. In the subroutine, I set .BusyType = egwOutOfOffice, but on the calender, the actual item is displayed as “free”. Each user has an auto-accept rule to accept appointments from themselves as Busy.

    What am I missing?

    This is using GroupWise 7.0.1.


    '
    ' Create appointments
    '

    Sub CreateAppointment

    Dim objAppt
    Dim objNewAppt
    Dim objRecipient

    ' Create a draft appointment message with no user interface
    Set objAppt = GroupWise.Account.Calendar.Messages.Add("GW.MESSAGE.APPOINTMENT", fgwDraft)

    ' Add a single recipient - myself
    Set objRecipient = objAppt.Recipients.Add(GroupWise.Account.Owner.EmailAddress,,0)

    With objAppt
    .OnCalendar = TRUE
    .Priority = fgwNormal
    .Place = "calendar event"
    .StartDate = HolidayDate
    .EndDate = HolidayDate
    .Duration = 1 '0.5 = 12 hours, 1/24 = 1 hour
    .NotifyWhenAccepted = fgwNoNotify
    .NotifyWhenDeclined = fgwNoNotify
    .AlarmSet = FALSE
    .BusyType = egwOutOfOffice
    .Subject = HolidayTitle
    .BodyText.PlainText = "Today is " & HolidayTitle
    End With

    Set objNewAppt = objAppt.Send

    Set objRecipient = Nothing
    Set objAppt = Nothing

    End Sub
  • Author
    Replies
  • #7791
    Support 2
    Moderator

    Similar to your use of the constant fgwNormal, try fgwOutOfOffice rather than egwOutOfOffice, which is the native GroupWise constant name and which will not be recognized by the Formativ Language.

    The Formativ Language is scripted and not a compiled language. As a result, Formativ does not expose the native GroupWise constants automatically within the language. Instead, we support a range of constants which have the ‘fgw’ prefix and not ‘egw’. If you find the Formativ Language does not have an equivalent fgw constant for the native egw one, you can do the following:

    • use the documented GroupWise API constant’s value directly within your applet code, such as 1 or TRUE etc, or
    • at the beginning of your applet, define a new constant name and assign it to the desired GroupWise API constant’s value and subsequently use your constant name within your applet code.

    I hope this helps.

    Regards,

    Advansys Support

    #7792
    dgerisch
    Participant

    Thank you – that explains it. Smile

    #7793
    Support 3
    Participant

    Thanks for your feedback.

    Regards,
    Advansys Support

    #7790
    jdunkerley
    Participant

    Do you know how to mark an appointment as urgent or high priority? All examples that I’ve found have the default as “Draft”.

    #7794
    Support 3
    Participant

    See the sample code below set Priority of the Appointment message to High. The above sample code also set the Priority to Normal. See the Object API for more information about the message properties.

      
    with objAppt
     .OnCalendar = TRUE
     .Priority = fgwHigh
    end with
    

    These constants identify the priority of a message. See the Formativ Language Guide for more information about the constants.
    fgwLow (1)
    fgwNormal (2)
    fgwHigh (3)

    Regards,
    Advansys Support

    #7789
    jdunkerley
    Participant

    When I view the appointment in the INBOX I can tell that the priority is set to high, but it does not show on the calendar as a high priority. How do I make an appointment show as a high priority on the calendar?

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.