var dataQry = arguments.eventsQuery;
var filterData = arguments.filterStruct;
var filteredQry = QueryNew("temp");
var orgIndex = 1;
var catIndex = 1;
var allOrgsSelectedValue = getAllOrganizationsDefaultValue();
SELECT *
FROM dataQry
WHERE 1=1
AND eventApproved =
AND (
organization LIKE
OR
OR organization =
)
--->
AND (
category LIKE
OR
)
--->
ORDER BY eventDate, AllDay DESC, StartTime
var dataQry = arguments.eventsQuery;
var filteredQry = QueryNew("temp");
SELECT *
FROM dataQry
ORDER BY eventDate, AllDay DESC, StartTime
var filterData = StructNew();
var key = "";
var fieldExceptionList = "FormattedDateAdded,FormattedDateApproved,FormattedUserInfo,ResolvedURL";
for ( key in arguments.filterStruct ) {
if ( !ListFindNoCase(fieldExceptionList,key) ){
filterData[key] = arguments.filterStruct[key];
}
}
return filterData;
var retStruct = StructNew();
var dayBeginTime = getDayBeginTime();
var dayEndTime = getDayEndTime();
// Switch/case to get date ranges based on dateRangeType and the selected date
switch(arguments.dateRangeType)
{
case "Day":
retStruct.startDate = application.ptCalendar.Date.csDateFormat(request.ptCalendar.fullDate, dayBeginTime);
retStruct.endDate = application.ptCalendar.Date.csDateFormat(request.ptCalendar.fullDate, dayEndTime);
break;
case "Week":
retStruct.startDate = application.ptCalendar.Date.csDateFormat(request.ptCalendar.firstOfThisWeek, dayBeginTime);
retStruct.endDate = application.ptCalendar.Date.csDateFormat(request.ptCalendar.lastOfThisWeek, dayEndTime);
break;
case "Quarter":
retStruct.startDate = application.ptCalendar.Date.csDateFormat(request.ptCalendar.firstOfThisQuarter, dayBeginTime);
retStruct.endDate = application.ptCalendar.Date.csDateFormat(request.ptCalendar.lastOfThisQuarter, dayEndTime);
break;
default: // Month is the default
retStruct.startDate = application.ptCalendar.Date.csDateFormat(request.ptCalendar.firstOfThisMonth, dayBeginTime);
retStruct.endDate = application.ptCalendar.Date.csDateFormat(request.ptCalendar.lastOfThisMonth, dayEndTime);
}
return retStruct;