celldata = "";
recordList = "";
recordListCount = 0;
recordListHTML = "";
customDelimiter = "|";
// 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,delimiter=customDelimiter);
// Count the generated list
if ( LEN(TRIM(recordList)) )
recordListCount = ListLen(recordList,customDelimiter);
// Modify the list for display
recordListHTML = recordList;
}
if ( recordListCount LTE 0 )
recordListHTML = allOrgsLabel;
else
recordListHTML = REPLACE(recordListHTML,customDelimiter,"
","all");
// Remove spaces and replace
recordListHTML = REREPLACE(recordListHTML,"[\s]"," ","all");
#recordListHTML# |