variables.ElementName = getTwitterAccountsKeywordsCEName();
variables.CCAPIName = getCCAPIName(ceName=variables.ElementName);
variables.ElementIDfield = "uniqueID";
var ceArray = Application.ptSocialMedia.CEData.getCEData(variables.ElementName);
return ceArray;
var fieldName = "feedActive";
var fieldValue = 1;
return Application.ptSocialMedia.CEData.getCEData(variables.ElementName,fieldName,fieldValue);
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 ( 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;
var retStatusStruct = StructNew();
var dataValues = StructNew();
var status = "";
var serviceData = StructNew();
retStatusStruct['MSG'] = "failed";
retStatusStruct['CONTENTUPDATED'] = false;
retStatusStruct['STATUS'] = status;
// Get the Element Record Data for the passed in FeedID
serviceData = getTwitterAccountKeywordByID(
uniqueID=TRIM(arguments.feedID)
);
if ( StructKeyExists(serviceData,"values") ) {
// Copy existing values and dataPageID to the dataValues struct
dataValues = serviceData.values;
dataValues.dataPageID = serviceData.PageID;
if ( StructKeyExists(serviceData.values,"postExcludeList") ) {
if ( ListFindNoCase(serviceData.values.postExcludeList,arguments.postID) EQ 0 ) {
dataValues.postExcludeList = ListAppend(serviceData.values.postExcludeList,arguments.postID);
status = "updated";
}
} else {
dataValues.postExcludeList = arguments.postID;
status = "updated";
}
}
/*if ( ArrayLen(mappingArray) AND StructKeyExists(mappingArray[1],"values") ) {
// Copy existing values and dataPageID to the dataValues struct
dataValues = mappingArray[1].values;
dataValues.dataPageID = mappingArray[1].PageID;
dataValues.destinationSubsiteID = arguments.destinationSubsiteID;
status = "updated";
} else {
// Create Record if pageMappingStruct is empty
dataValues.uniqueID = CreateUUID();
dataValues.copyJobID = arguments.copyjobID;
dataValues.sourceSubsiteID = arguments.sourceSubsiteID;
dataValues.destinationSubsiteID = arguments.destinationSubsiteID;
status = "new";
} */
if ( status EQ "updated" ) {
// Call the CCAPI to update the element
retStatusStruct = twitterAccountsKeywordsCCAPI(dataValues);
}
if ( retStatusStruct['CONTENTUPDATED'] IS true ) {
retStatusStruct['MSG'] = 'success';
retStatusStruct['STATUS'] = status;
}
return retStatusStruct;
var retStatusStruct = StructNew();
// Populate dataValues struct into the element
retStatusStruct = application.ptSocialMedia.csContent.populateContent(variables.CCAPIName, arguments.dataValues);
/* retStatusStruct RETURNS: CONTENTUPDATED : true/false & CONTENTUPDATERESPONSE: Success:1 */
return retStatusStruct;