variables.ElementName = getYouTubeChannelsCEName();
variables.CCAPIName = getCCAPIName(ceName=variables.ElementName);
variables.ElementIDfield = "uniqueID";
variables.serviceTypeName = 'youtube';
variables.FilterElementName = getPostFilteringCEName();
variables.FilterCCAPIName = getCCAPIName(ceName=variables.FilterElementName);
variables.excludeListField = "youtubeExcludedList";
variables.includeListField = "youtubeIncludedList";
var retArr = [];
var mmcComponent = Server.CommonSpot.api.getObject('multimediaChannel');
var mmcListQuery = mmcComponent.getList(serviceid=3);
retArr = Application.ptSocialMedia.data.queryToArrayOfStructures(queryData=mmcListQuery,keysToLowercase=true);
return retArr;
var retArr = [];
var dataArr = getYouTubeChannels();
for (var i=1; i <= ArrayLen(dataArr); i++ ) {
if ( IsBoolean(dataArr[i].CHANNELISACTIVE) AND dataArr[i].CHANNELISACTIVE )
ArrayAppend(retArr,dataArr[i]) ;
}
return retArr;
var dataStruct = StructNew();
var ceArray = Application.ptSocialMedia.CEData.getCEData(variables.ElementName,variables.ElementIDfield,arguments.uniqueID);
if ( ArrayLen(ceArray) )
dataStruct = ceArray[1];
return dataStruct;
var ceArray = ArrayNew(1);
var newArray = ArrayNew(1);
// if idList has values, get the values that match items in the list from the element
if ( ListLen(arguments.idList) )
ceArray = Application.ptSocialMedia.CEData.getCEData(variables.ElementName,variables.ElementIDfield,arguments.idList);
// Check to see is a filter field and filter value has been passed
if ( LEN(TRIM(arguments.filterField)) AND LEN(TRIM(arguments.filterValue)) ) {
for ( var itm=1; itm LTE ArrayLen(ceArray); itm=itm+1 ) {
// - Filter out records that do not match the 'FilterValue'
if ( StructKeyExists(ceArray[itm].values,arguments.filterField) AND TRIM(ceArray[itm].values[arguments.filterField]) EQ arguments.filterValue )
arrayAppend(newArray, ceArray[itm]);
}
// Convert newArray back the ceArray for the return
ceArray = newArray;
}
return ceArray;
return socialMediaFilteringCCAPI(dataValues=arguments.dataValues);