celldata = "";
recordList = "";
recordListCount = 0;
recordListHTML = "";
// Get the Default 'All Organizations' Values from the Config
allOrgsLabel = application.ptCalendar.getAllOrganizationsLabel();
allOrgsValue = application.ptCalendar.getAllOrganizationsValue();
if ( LEN(TRIM(request.datasheet.currentColumnValue)) AND request.datasheet.currentColumnValue NEQ allOrgsValue ) {
// Get the Element Data as a list form for the IDs in stored column values
recordList = application.ptCalendar.calOrganizationsDAO.getCalOrganizationsNames(uniqueID=request.datasheet.currentColumnValue);
// Count the generated list
if ( LEN(TRIM(recordList)) )
recordListCount = ListLen(recordList,",");
// Modify the list for display
recordListHTML = recordList;
}
if ( recordListCount LTE 0 )
recordListHTML = allOrgsLabel;
else
recordListHTML = REREPLACE(recordListHTML,",","
","all");
// Remove spaces and replace
recordListHTML = REREPLACE(recordListHTML,"[\s]"," ","all");
#recordListHTML# |