How To: Create an Exchange Appointment Form
You can use the Appointment SmartObject of the Exchange Online Broker to create a form that sets up appointments in the attendees' Outlook calendars, such as in a medical appointment booking system or other any appointment scenario.
You must activate the Exchange Online feature to create an instance of the Exchange Online service type. See Exchange Online Feature Activation.
The Create method of the Appointment SmartObject requires Subject, Start Date, End Date, and Time Zone values. The example below shows how to create a view of the Appointment SmartObject with:
- Text boxes for the Subject and Body
- A drop-down for Time Zone linked to the Time Zone SmartObject list method
- DateTime controls for the Start Date and End Date
- An Attendees text box with a modified tool tip to request a semicolon delimited list of email addresses
More properties are available from the Appointment SmartObject. See Exchange Online SmartObjects Reference for more information.
Follow the steps below to create the Appointment Form:
Create the Make an appointment View
- From the K2 Designer, create a new Item View linked to the Appointment SmartObject of the Exchange Online service.
- Click Create.
- Click the Create Labels and Controls link.
- Select to include the Subject, Body, Start Date, End Date, and Required Attendees fields.
- Click OK to start designing the view.
- Select the Start Date calendar control.
- Click the Picker Type setting and configure it to provide both Date and Time, selecting hh:mm:ss tt as the Time format.
- Click OK
- Do the same for the End Date calendar control.
- Select the Required Attendees text area control.
- Change the Watermark to Type a semicolon delimited list of email addresses .
- Select the view Toolbox tab and drag a Label control on the empty cell below End Date.
- Change the label Name to Time Zone Label.
- Specify Time Zone as the Text field.
- Select the Drop-Down List control from the Toolbox and drag it below the Time Zone Label.
- Configure the Drop-Down List to use Time Zone for the Drop-Down Field.
- Click the ellipses of the Data Source Type and configure it to use the Exchange Time Zone SmartObject list method.
- Select Name from the Value drop-down.
- Click OK to complete the data source.
- Click on the empty space below the Time Zone drop down in the view and select Insert Row Below from the top view menu icons.
- Select the Methods tab in the toolbox and drag the Create method in to the new row.
- Your view should look similar to the following:
- Click Finish.
Create the Make an appointment Form
- From the Make an appointment view page, select the Design a new Form option.
- Specify Make an appointment as the Name and Description and click the Create button.
- Click the (Enter View Title) area and type Make an appointment.
- Click on Finish.
Test the Form
- Select Run from the Make an appointment form.
- Specify a Subject and Body.
- Specify a Start Date and End Date, making the appointment for tomorrow and the end time value an hour later than the start.
- Use you own email address as the Required Attendees value (so the appointment is added to your Outlook calendar).
- Select your time zone from the Time Zone drop-down.
- Click Create.
- Open Outlook and check tomorrow's calendar where you see the new appointment.