var retList = arguments.currList; var idPos = 0; if ( arguments.actionType EQ "add" ) { // Check to make sure the value is NOT in the list if ( ListFindNoCase(retList, arguments.currItem) EQ 0 ) { // Handle the ADD action retList = ListAppend(retList, arguments.currItem); } } else if ( arguments.actionType EQ "remove" ) { // Check if the value is in the list if ( ListFindNoCase(retList, arguments.currItem) ) { // Handle the REMOVE action idPos = ListFindNoCase(retList, arguments.currItem); retList = ListDeleteAt(retList, idPos); } } return retList; var dtArray = variables.scheduleBuilderDAO.getDateTimeDataByClassID(classID=arguments.parentID); var itm=1; var retData = ""; // Loop over the returned data for (itm=1; itm LTE ArrayLen(dtArray); itm=itm+1) { // Add the uniqueIDs to the retData list List if ( StructKeyExists(dtArray[itm],"values") AND StructKeyExists(dtArray[itm].values,"uniqueID") AND LEN(TRIM(dtArray[itm].Values.uniqueID)) ) retData = ListAppend(retData,dtArray[itm].Values.uniqueID); } return retData; //var dtData = application.ptCourseCatalog.scheduleBuilderDAO.getDateTimeDataByCalEventID(calEventID=arguments.parentID); var dtData = variables.scheduleBuilderDAO.getDateTimeDataByClassID(uniqueID=arguments.parentID); var deletedItemStatus = false; var deletedItemsList = ""; var itm = 0; for ( itm=1; itm LTE ArrayLen(dtData); itm=itm+1 ) { if ( IsNumeric(dtData[itm].pageID) AND dtData[itm].pageID GT 0 ) { //deletedItemStatus = application.ptCourseCatalog.scheduleBuilderDAO.deleteDateTimeData(dtData[itm].pageID); deletedItemStatus = variables.scheduleBuilderDAO.deleteDateTimeData(dtData[itm].pageID); if ( deletedItemStatus ) { deletedItemsList = ListAppend(deletedItemsList,dtData[itm].values.uniqueID); } } } return deletedItemsList;