Create an ical calendar item1) The script must contain the following fields:
* If the Time field is not available in your CallScripter instance you will need to combine two list boxes and a hidden field to replicate this.
You will need one list box containing hours 00 – 23 and another list box containing minutes 00 – 59 (place a ‘:’ in the text of the minutes list box and place this control beside your hours list box).
Add a hidden field and change the Field Name to ‘start_time’. Add a calculate field to contain the values of both the hours and minutes list boxes together with a colon ‘:’ in the middle. Repeat this process for end time.
2) Create a report against the script. This report will need to be a Plain Text Template report and the Filename should be appended with “.ics”.
3) Add two styles under the Field styling tab to correctly format date and time fields.
time_hhmmss
date_yyyymmdd
4) Add the below fields and apply the styling as depicted (use your hidden fields for start and end time/date if these were used). Set all quotes to off.
5) Generate a template for the plain text template report. Click the download button and save the template on to your desktop.
6) Locate the file on your desktop and open it in notepad. Replace the code within the notepad file with the below code and save the changes to your desktop.
The code in blue is required to construct the Ical file and the code in red is the place holders for sourced script data (data passed from the script).
__BeginRecord__BEGIN:VCALENDAR
VERSION:1.0
BEGIN:VEVENT
DTSTART:__SCRD_start_date_1____SCRD_start_date_2__
DTEND:__SCRD_start_date_3____SCRD_end_time_4__
SUMMARY:__SCRD_summary_5__
LOCATION:__SCRD_location_6__
DESCRIPTION:__SCRD_description_7__
PRIORITY:3
END:VEVENT
END:VCALENDAR
__EndRecord__
7) Upload this new template to the report in CallScripter.
8) Go back to the script and add a new page. Add a ‘Report Runner – Preview – Attachment’ control and in the control properties set it to run the report.
9) Test the script - add test data into all the fields, and send the report.
|