var retStruct = StructNew();
var occurrDataQry = QueryNew("temp");
var occurrDataStruct = StructNew();
var occurrDataPageID = "";
var occurrEventID = "";
var seriesDataQry = QueryNew("temp");
var seriesDataStruct = StructNew();
var seriesDataPageID = "";
var seriesEventID = "";
var seriesRecurrenceID = "";
var isDateTimeOrphan = false;
var dataTimeStruct = StructNew();
var recurrenceStruct = StructNew();
var eventType = ""; // Options: recurrencePattern, brokenRecurrence, orphanDateTime, siblingDateTime
// Using the supplied dateTimeID and/or the hashID get the:
// 1) datapageID and eventID for the occurrence
// 2) datapageID and eventID for the series (if applicable)
if ( LEN(TRIM(arguments.dateTimeID)) AND LEN(TRIM(arguments.hashID)) )
{
// DateTimeID and a HashID
// - This is a recurrence exception
// - This event has a static dataTime that was created from a recurrence pattern
// - DOES have a dateTime record in the DateTime custom element
eventType = "brokenRecurrence";
// occurrDataPageID - will be the DatePageID the dateTime record of this Occurrence Event that was created as an recurrence exception
// occurrEventID - will be the EventID the dateTime record of this Occurrence Event that was created as an recurrence exception
// seriesDataPageID - will be the DatePageID of the Series Event that was parent of this recurrence exception
// seriesEventID - will be the EventID of the Series Event that was parent of this recurrence exception
// Get Event Details by the eventID
occurrDataQry = application.ptCalendar.calEventsDAO.getEvents(dateTimeID=TRIM(arguments.dateTimeID),hashID=TRIM(arguments.hashID),useCache=arguments.useCache);
if ( occurrDataQry.RecordCount )
{
occurrDataStruct = application.ptCalendar.data.queryRowToStruct(query=occurrDataQry,rowNum=1);
// This Occurrence IDs
if ( StructKeyExists(occurrDataStruct,"calEventID") AND LEN(TRIM(occurrDataStruct.calEventID)) )
occurrEventID = occurrDataStruct.calEventID;
if ( StructKeyExists(occurrDataStruct,"pageID") AND IsNumeric(occurrDataStruct.pageID) AND occurrDataStruct.pageID GT 0 )
occurrDataPageID = occurrDataStruct.pageID;
// The Parent Series IDs
if ( StructKeyExists(occurrDataStruct,"seriesparentid") AND LEN(TRIM(occurrDataStruct.seriesparentid)) )
{
// Set the seriesEventID to the parentID of the current event
seriesEventID = occurrDataStruct.seriesparentid;
// Get the Data Structure for the parent event that this event was created from
seriesDataQry = application.ptCalendar.calEventDetailsDAO.getEventDetailsQuery(eventID=TRIM(seriesEventID));
// Convert the First Row of the Query to a struct
if ( seriesDataQry.RecordCount )
seriesDataStruct = application.ptCalendar.data.queryRowToStruct(query=seriesDataQry,rowNum=1);
// Set Series DataPageID for the Parent Series
if ( StructKeyExists(seriesDataStruct,"pageID") AND IsNumeric(seriesDataStruct.pageID) AND seriesDataStruct.pageID GT 0 )
seriesDataPageID = seriesDataStruct.pageID;
// Get the recurrenceID of the parent
if ( StructKeyExists(seriesDataStruct,"eventrecurrenceid") AND LEN(TRIM(seriesDataStruct.eventrecurrenceid)) )
seriesRecurrenceID = seriesDataStruct.eventrecurrenceid;
}
}
}
else if ( LEN(TRIM(arguments.dateTimeID)) )
{
// DateTimeID (only - no hashID)
// Get Event Details (eventID) by the dateTimeID
occurrDataQry = application.ptCalendar.calEventsDAO.getEvents(dateTimeID=TRIM(arguments.dateTimeID),useCache=arguments.useCache);
//application.ptCalendar.utils.doDump(occurrDataQry,"occurrDataQry",0);
// occurrDataPageID - will be the DatePageID the dateTime record of this Occurrence Event
// occurrEventID - will be the EventID of this Occurrence Event
// seriesDataPageID - NA
// seriesEventID - NA
// If the dataQry has return results get the IDs we need to move on
if ( occurrDataQry.RecordCount )
{
occurrDataStruct = application.ptCalendar.data.queryRowToStruct(query=occurrDataQry,rowNum=1);
// This Occurrence IDs
if ( StructKeyExists(occurrDataStruct,"calEventID") AND LEN(TRIM(occurrDataStruct.calEventID)) )
occurrEventID = occurrDataStruct.calEventID;
if ( StructKeyExists(occurrDataStruct,"pageID") AND IsNumeric(occurrDataStruct.pageID) AND occurrDataStruct.pageID GT 0 )
occurrDataPageID = occurrDataStruct.pageID;
// Let start with the assumption that this Occurence is an orpaned dateTime record
// so we will work to prove that there are siblings
isDateTimeOrphan = true;
if ( LEN(TRIM(occurrEventID)) )
dataTimeStruct = buildDateTimeIDsByEventID(occurrEventID);
// Check to see if this Occurrence is an ORPHAN or has SIBLINGS
if ( StructKeyExists(dataTimeStruct,"DATETIMEIDLIST") AND LEN(TRIM(dataTimeStruct.DATETIMEIDLIST)) )
{
// if we have dateTimeIDs this is a SIBLING (DO NOT delete the event)
if ( ListLen(dataTimeStruct.DATETIMEIDLIST) GT 1 )
isDateTimeOrphan = false;
}
// Check for a recurrence props
if ( isDateTimeOrphan )
{
if ( LEN(TRIM(occurrEventID)) )
recurrenceStruct = buildRecurrenceIDsByEventID(occurrEventID);
if ( StructKeyExists(recurrenceStruct,"RecurrenceIDlist") AND LEN(TRIM(recurrenceStruct.RecurrenceIDlist)) )
{
// if we have recurrence props this is a SIBLING
isDateTimeOrphan = false;
}
}
// Now set the EventType based on the SIBLING search results
if ( isDateTimeOrphan )
{
// This is a static date/time
// - Was NOT created from an recurrence pattern
// - Has a SINGLE dateTime record in the DateTime custom element
eventType = "orphanDateTime";
}
else
{
// This is a static date/time
// - Was NOT created from an recurrence pattern
// - HAS MUTILPE dateTime records in the DateTime custom element
eventType = "siblingDateTime";
}
}
}
else if ( LEN(TRIM(arguments.hashID)) )
{
// HashID (only - no dateTimeID)
// - This is part of a Recurrence Pattern
// - DOES NOT have a dateTime record in the DateTime custom element
eventType = "recurrencePattern";
// occurrDataPageID - NA
// occurrEventID - NA
// seriesDataPageID - will be the DatePageID of the Series Event that was parent of this recurrence exception
// seriesEventID - will be the EventID of the Series Event that was parent of this recurrence exception
// Get Event Details (eventID) by the hashID
seriesDataQry = application.ptCalendar.calEventsDAO.getEvents(hashID=TRIM(arguments.hashID),useCache=arguments.useCache);
// If the dataQry has return results get the IDs we need to move on
if ( seriesDataQry.RecordCount )
{
// This would be Series Data
seriesDataStruct = application.ptCalendar.data.queryRowToStruct(query=seriesDataQry,rowNum=1);
// The Parent Series IDs
if ( StructKeyExists(seriesDataStruct,"calEventID") AND LEN(TRIM(seriesDataStruct.calEventID)) )
seriesEventID = seriesDataStruct.calEventID;
if ( StructKeyExists(seriesDataStruct,"pageID") AND IsNumeric(seriesDataStruct.pageID) AND seriesDataStruct.pageID GT 0 )
seriesDataPageID = seriesDataStruct.pageID;
if ( StructKeyExists(seriesDataStruct,"eventrecurrenceid") AND LEN(TRIM(seriesDataStruct.eventrecurrenceid)) )
seriesRecurrenceID = seriesDataStruct.eventrecurrenceid;
}
}
retStruct.occurrEventID = occurrEventID;
retStruct.occurrDataPageID = occurrDataPageID;
retStruct.seriesEventID = seriesEventID;
retStruct.seriesDataPageID = seriesDataPageID;
retStruct.seriesRecurrenceID = seriesRecurrenceID;
retStruct.eventType = eventType;
//retStruct.occurrEventQry = occurrDataQry;
retStruct.occurrEventData = occurrDataStruct;
//retStruct.seriesEventQry = seriesDataQry;
retStruct.seriesEventData = seriesDataStruct;
return retStruct;
var retData = StructNew();
var seriesArray = ArrayNew(1);
var eventData = StructNew();
var parentDataQry = QueryNew("temp");
var childDataQry = QueryNew("temp");
var itm=1;
var childItm=1;
var childEventID = "";
var childDataPageID = "";
var childRowData = StructNew();
// Set Up the Return Data Structure with the Series Info
retData.seriesData = ArrayNew(1);
retData.seriesEventIDlist = "";
// Get Event Details by the eventID (All actual event records ... NOT any virtual event)
if ( LEN(TRIM(arguments.parentEventID)) )
parentDataQry = application.ptCalendar.calEventDetailsDAO.getEventDetailsQuery(eventID=TRIM(arguments.parentEventID));
//application.ptCalendar.utils.doDump(parentDataQry,"parentDataQry",0);
if ( parentDataQry.RecordCount )
{
for ( itm=1; itm LTE parentDataQry.RecordCount; itm=itm+1 )
{
eventData = StructNew();
eventData.parentEventID = parentDataQry["uniqueID"][itm];
eventData.parentData = application.ptCalendar.data.queryRowToStruct(query=parentDataQry,rowNum=itm);
if ( arguments.includeExceptions )
{
eventData.childEventIDlist = "";
eventData.childData = ArrayNew(1);
}
// - Add the event IDs to the seriesEventIDlist
if ( ListFind(retData.seriesEventIDlist,eventData.parentEventID) EQ 0 )
retData.seriesEventIDlist = ListAppend(retData.seriesEventIDlist,eventData.parentEventID);
/* LOOP OVER SERIES CHILDREN */
if ( LEN(TRIM(eventData.parentEventID)) AND arguments.includeExceptions )
{
// Get the Child (Exception Events) that belong to the is Parent (Series) event
childDataQry = application.ptCalendar.calEventDetailsDAO.getEventDetailsQueryBySeriesParentID(seriesParentID=eventData.parentEventID);
//application.ptCalendar.utils.doDump(childDataQry,"childDataQry",0);
for ( childItm=1; childItm LTE childDataQry.RecordCount; childItm=childItm+1 )
{
childEventID = childDataQry["uniqueID"][childItm];
childRowData = application.ptCalendar.data.queryRowToStruct(query=childDataQry,rowNum=childItm);
if ( ListFind(eventData.childEventIDlist,childEventID) EQ 0 )
{
// And the EventID for the Child Event to the List
eventData.childEventIDlist = ListAppend(eventData.childEventIDlist,childEventID);
// And the Event Data for the Child Event to the Array
ArrayAppend(eventData.childData,childRowData);
}
// Build the Series Family Info
if ( ListFind(retData.seriesEventIDlist,childEventID) EQ 0 )
retData.seriesEventIDlist = ListAppend(retData.seriesEventIDlist,childEventID);
}
}
arrayAppend(seriesArray,eventData);
}
}
retData.seriesData = seriesArray;
return retData;
var eventData = getSeriesEventIDsByParentEventID(parentEventID=arguments.parentEventID,includeExceptions=arguments.includeExceptions);
var eventIDlist = "";
var deletedItemsStruct = StructNew();
var itm = 1;
var deletedEventIDs = "";
var deletedRecurPropIDs = "";
var deletedDateTimeIDs = "";
var deletedEventsList = "";
var deletedRecurPropsList = "";
var deletedDateTimeList = "";
if ( StructKeyExists(eventData,"SeriesEventIDList") )
eventIDlist = eventData.SeriesEventIDList;
for ( itm=1; itm LTE ListLen(eventIDlist); itm=itm+1 )
{
deleteEventItem = ListGetAt(eventIDlist,itm);
if ( LEN(TRIM(deleteEventItem)) )
{
deletedEventIDs = application.ptCalendar.calEventDetailsService.deleteEventDetailsByEventID(eventID=deleteEventItem);
//application.ptCalendar.utils.doDump(deletedEventIDs,"deletedEventIDs",1);
if ( LEN(TRIM(deletedEventIDs)) )
deletedEventsList = ListAppend(deletedEventsList,deletedEventIDs);
deletedRecurPropIDs = application.ptCalendar.recurrenceBuilderService.deleteRecurrenceByParentID(parentID=deleteEventItem);
//application.ptCalendar.utils.doDump(deletedRecurPropIDs,"deletedRecurPropIDs",1);
if ( LEN(TRIM(deletedRecurPropIDs)) )
deletedRecurPropsList = ListAppend(deletedRecurPropsList,deletedRecurPropIDs);
deletedDateTimeIDs = application.ptCalendar.dateTimeBuilderService.deleteDateTimesByParentID(parentID=deleteEventItem);
//application.ptCalendar.utils.doDump(deletedDateTimeIDs,"deletedDateTimeIDs",1);
if ( LEN(TRIM(deletedDateTimeIDs)) )
deletedDateTimeList = ListAppend(deletedDateTimeList,deletedDateTimeIDs);
}
}
deletedItemsStruct.deletedEventIDs = deletedEventsList;
deletedItemsStruct.deletedRecurrPropIDs = deletedRecurPropsList;
deletedItemsStruct.deletedDateTimeIDs = deletedDateTimeList;
return deletedItemsStruct;
var retData = StructNew();
var seriesStruct = application.ptCalendar.calEventsSeriesService.getSeriesIDsAndChildrenByEventID(
eventID=eventID
,includeDateTime=arguments.includeDateTime
,includeRecurrence=arguments.includeRecurrence
);
if ( arguments.includeEventDetails )
retData[seriesStruct.SERIESFORMID] = seriesStruct.SERIESDATAPAGEIDLIST;
if ( arguments.includeDateTime )
retData[seriesStruct.SERIESDATETIMEFORMID] = seriesStruct.SERIESDATETIMEDATAPAGEIDLIST;
if ( arguments.includeRecurrence )
retData[seriesStruct.SERIESRECURRENCEFORMID] = seriesStruct.SERIESRECURRENCEDATAPAGEIDLIST;
return retData;
var retData = StructNew();
var seriesArray = ArrayNew(1);
var eventData = StructNew();
var parentDataQry = QueryNew("temp");
var childDataQry = QueryNew("temp");
var itm=1;
var childItm=1;
var childEventID = "";
var childDataPageID = "";
var childRowData = StructNew();
var childDTdata = StructNew();
var parentDTdata = StructNew();
var childRecurData = StructNew();
var parentRecurrData = StructNew();
// Set Up the Return Data Structure with the Series Info
//retData.seriesData = ArrayNew(1);
retData.seriesEventIDlist = "";
retData.seriesDataPageIDlist = "";
retData.seriesFormID = application.ptCalendar.getCalEventDetailsFormID();
// DateTime IDs
if ( arguments.includeDateTime )
{
retData.DateTimeIDlist = "";
retData.DateTimeDataPageIDlist = "";
retData.DateTimeFormID = application.ptCalendar.getEventDateTimeFormID();
}
// Recurrence IDs
if ( arguments.includeRecurrence )
{
retData.RecurrenceIDlist = "";
retData.RecurrenceDataPageIDlist = "";
retData.RecurrenceFormID = application.ptCalendar.getEventRecurrenceFormID();
}
// Get Event Details by the eventID (All actual event records ... NOT any virtual event)
if ( LEN(TRIM(arguments.eventID)) )
parentDataQry = application.ptCalendar.calEventDetailsDAO.getEventDetailsQuery(eventID=TRIM(arguments.eventID));
//application.ptCalendar.utils.doDump(parentDataQry,"parentDataQry",0);
if ( parentDataQry.RecordCount )
{
for ( itm=1; itm LTE parentDataQry.RecordCount; itm=itm+1 )
{
eventData = StructNew();
eventData.parentID = parentDataQry["uniqueID"][itm];
eventData.parentDataPageID = parentDataQry["pageid"][itm];
eventData.parentData = application.ptCalendar.data.queryRowToStruct(query=parentDataQry,rowNum=itm);
eventData.childDataPageIDlist = "";
eventData.childEventIDlist = "";
eventData.childData = ArrayNew(1);
// Build the Series Family Info
// - Add the event IDs to the seriesEventIDlist
if ( ListFind(retData.seriesEventIDlist,eventData.parentID) EQ 0 )
retData.seriesEventIDlist = ListAppend(retData.seriesEventIDlist,eventData.parentID);
// - Add the event DataPageIDs to the seriesDataPageIDlist
if ( ListFind(retData.seriesDataPageIDlist,eventData.parentDataPageID) EQ 0 )
retData.seriesDataPageIDlist = ListAppend(retData.seriesDataPageIDlist,eventData.parentDataPageID);
if ( arguments.includeDateTime )
{
// Get the Series Parent Related DateTime ChildRecords
if ( LEN(TRIM(eventData.parentID)) )
parentDTdata = application.ptCalendar.calEventsSeriesService.buildDateTimeIDsByEventID(eventID=eventData.parentID);
//application.ptCalendar.utils.doDump(parentDTdata,"parentDTdata",0);
eventData.parentDateTimeData = parentDTdata;
if ( !StructIsEmpty(parentDTdata) )
{
// Build the Series Family Recurrence ID List
if ( LEN(TRIM(parentDTdata.DateTimeIDlist)) )
retData.DateTimeIDlist = ListAppend(retData.DateTimeIDlist,TRIM(parentDTdata.DateTimeIDlist));
if ( LEN(TRIM(parentDTdata.DateTimeIDlist)) )
retData.DateTimeDataPageIDlist = ListAppend(retData.DateTimeDataPageIDlist,TRIM(parentDTdata.DateTimeDataPageIDlist));
}
}
if ( arguments.includeRecurrence )
{
// Get the Series Parent Related Recurrence Child Records
if ( LEN(TRIM(eventData.parentID)) )
parentRecurrData = application.ptCalendar.calEventsSeriesService.buildRecurrenceIDsByEventID(eventID=eventData.parentID);
//application.ptCalendar.utils.doDump(parentRecurrData,"parentRecurrData",0);
eventData.parentRecurrenceData = parentRecurrData;
if ( !StructIsEmpty(parentRecurrData) )
{
// Build the Series Family DateTime ID List
if ( LEN(TRIM(parentRecurrData.RecurrenceIDlist)) )
retData.RecurrenceIDlist = ListAppend(retData.RecurrenceIDlist,TRIM(parentRecurrData.RecurrenceIDlist));
if ( LEN(TRIM(parentRecurrData.RecurrenceDataPageIDlist)) )
retData.RecurrenceDataPageIDlist = ListAppend(retData.RecurrenceDataPageIDlist,TRIM(parentRecurrData.RecurrenceDataPageIDlist));
}
}
/* LOOP OVER SERIES CHILDREN */
if ( LEN(TRIM(eventData.parentID)) )
{
eventData.childDateTimeData = ArrayNew(1);
eventData.childRecurrenceData = ArrayNew(1);
// Get the Child (Exception Events) that belong to the is Parent (Series) event
childDataQry = application.ptCalendar.calEventDetailsDAO.getEventDetailsQueryBySeriesParentID(seriesParentID=eventData.parentID);
for ( childItm=1; childItm LTE childDataQry.RecordCount; childItm=childItm+1 )
//for ( rcItm=1; rcItm LTE ArrayLen(dataArray); rcItm=rcItm+1 )
{
childEventID = childDataQry["uniqueID"][childItm];
childDataPageID = childDataQry["pageid"][childItm];
childRowData = application.ptCalendar.data.queryRowToStruct(query=childDataQry,rowNum=childItm);
if ( ListFind(eventData.childEventIDlist,childEventID) EQ 0 )
{
// And the EventID for the Child Event to the List
eventData.childEventIDlist = ListAppend(eventData.childEventIDlist,childEventID);
// And the Event Data for the Child Event to the Array
ArrayAppend(eventData.childData,childRowData);
}
// Add the DataPageID for the Child Event to the List
if ( ListFind(eventData.childDataPageIDlist,childDataPageID) EQ 0 )
eventData.childDataPageIDlist = ListAppend(eventData.childDataPageIDlist,childDataPageID);
// Build the Series Family Info
if ( ListFind(retData.seriesEventIDlist,childEventID) EQ 0 )
retData.seriesEventIDlist = ListAppend(retData.seriesEventIDlist,childEventID);
if ( ListFind(retData.seriesDataPageIDlist,childDataPageID) EQ 0 )
retData.seriesDataPageIDlist = ListAppend(retData.seriesDataPageIDlist,childDataPageID);
if ( arguments.includeDateTime )
{
// Get the Series Child Related DateTime Child Records
if ( LEN(TRIM(childEventID)) )
childDTdata = application.ptCalendar.calEventsSeriesService.buildDateTimeIDsByEventID(eventID=childEventID);
if ( !StructIsEmpty(childDTdata) )
{
ArrayAppend(eventData.childDateTimeData,childDTdata);
// Build the Series Family Recurrence ID List
if ( LEN(TRIM(childDTdata.DateTimeIDlist)) )
retData.DateTimeIDlist = ListAppend(retData.DateTimeIDlist,TRIM(childDTdata.DateTimeIDlist));
if ( LEN(TRIM(childDTdata.DateTimeDataPageIDlist)) )
retData.DateTimeDataPageIDlist = ListAppend(retData.DateTimeDataPageIDlist,TRIM(childDTdata.DateTimeDataPageIDlist));
}
}
if ( arguments.includeRecurrence )
{
// Get the Series Child Related Recurrence Child Records
if ( LEN(TRIM(childEventID)) )
childRecurData = application.ptCalendar.calEventsSeriesService.buildRecurrenceIDsByEventID(eventID=childEventID);
if ( !StructIsEmpty(childRecurData) )
{
ArrayAppend(eventData.childRecurrenceData,childRecurData);
// Build the Series Family DateTime ID List
if ( LEN(TRIM(childRecurData.RecurrenceIDlist)) )
retData.RecurrenceIDlist = ListAppend(retData.RecurrenceIDlist,TRIM(childRecurData.RecurrenceIDlist));
if ( LEN(TRIM(childRecurData.RecurrenceDataPageIDlist)) )
retData.RecurrenceDataPageIDlist = ListAppend(retData.RecurrenceDataPageIDlist,TRIM(childRecurData.RecurrenceDataPageIDlist));
}
}
}
}
arrayAppend(seriesArray,eventData);
}
}
//retData.seriesData = seriesArray;
return retData;
var retData = StructNew();
var dataArray = ArrayNew(1);
var recurrData = StructNew();
var dataQry = QueryNew("temp");
var itm=1;
// Get Event Recurrence Properties by the eventID (All actual event records ... NOT any virtual events)
if ( LEN(TRIM(arguments.eventID)) )
dataQry = application.ptCalendar.calEventRecurrenceDAO.getRecurrenceQueryByEventID(eventID=TRIM(arguments.eventID));
//application.ptCalendar.utils.doDump(dataQry,"dataQry",0);
if ( dataQry.RecordCount )
{
retData.RecurrenceData = ArrayNew(1);
retData.RecurrenceIDlist = "";
retData.RecurrenceDataPageIDlist = "";
retData.RecurrenceFormID = application.ptCalendar.getEventRecurrenceFormID();
for ( itm=1; itm LTE dataQry.RecordCount; itm=itm+1 )
{
// Get Recurrence IDs for each event recurrence child
recurrData = StructNew();
recurrData.RecurrenceID = dataQry["uniqueID"][itm];
recurrData.DataPageID = dataQry["pageid"][itm];
recurrData.FormID = application.ptCalendar.getEventRecurrenceFormID();
recurrData.Values = application.ptCalendar.data.queryRowToStruct(query=dataQry,rowNum=itm);
// Build the Series Family Info
if ( ListFind(retData.RecurrenceIDlist,recurrData.RecurrenceID) EQ 0 )
retData.RecurrenceIDlist = ListAppend(retData.RecurrenceIDlist,recurrData.RecurrenceID);
if ( ListFind(retData.RecurrenceDataPageIDlist,recurrData.DataPageID) EQ 0 )
retData.RecurrenceDataPageIDlist = ListAppend(retData.RecurrenceDataPageIDlist,recurrData.DataPageID);
arrayAppend(dataArray,recurrData);
}
retData.RecurrenceData = dataArray;
}
return retData;
var retData = StructNew();
var dataArray = ArrayNew(1);
var dtData = StructNew();
var dataQry = QueryNew("temp");
var itm=1;
// Get Event DateTime data by the eventID (All actual event records ... NOT any virtual events)
if ( LEN(TRIM(arguments.eventID)) )
dataQry = application.ptCalendar.calEventDateTimeDAO.getDateTimeQueryByEventID(eventID=TRIM(arguments.eventID));
//application.ptCalendar.utils.doDump(dataQry,"dataQry",0);
if ( dataQry.RecordCount )
{
retData.DateTimeData = ArrayNew(1);
retData.DateTimeIDlist = "";
retData.DateTimeDataPageIDlist = "";
retData.DateTimeFormID = application.ptCalendar.getEventDateTimeFormID();
for ( itm=1; itm LTE dataQry.RecordCount; itm=itm+1 )
{
// Get DateTime IDs for each event datetime child
dtData = StructNew();
dtData.DateTimeID = dataQry["uniqueID"][itm];
dtData.DataPageID = dataQry["pageid"][itm];
dtData.FormID = application.ptCalendar.getEventDateTimeFormID();
dtData.Values = application.ptCalendar.data.queryRowToStruct(query=dataQry,rowNum=itm);
// Build the Series Family Info
if ( ListFind(retData.DateTimeIDlist,dtData.DateTimeID) EQ 0 )
retData.DateTimeIDlist = ListAppend(retData.DateTimeIDlist,dtData.DateTimeID);
if ( ListFind(retData.DateTimeDataPageIDlist,dtData.DataPageID) EQ 0 )
retData.DateTimeDataPageIDlist = ListAppend(retData.DateTimeDataPageIDlist,dtData.DataPageID);
arrayAppend(dataArray,dtData);
}
retData.DateTimeData = dataArray;
}
return retData;