Filter objects

Use filter objects in Cognos Controller to filter on specific data that is loaded or calculated. Create filter definitions with the filter objects in the source or target functions that are in the script.

The filter objects are python language function objects that are passed to the source and target functions 'removeData' and 'retainData'.

You must specify the code of the dimension in a function because you cannot type the dimension code directly in the filter objects. The exception is a journal number. You can type a journal number directly in a filter object.

Remove all transactions at the source that contain a journal number '0'

def XXXXX (transaction):
	return transaction.containsJournal(0)
source.removeData (XXXXX)

Keep all transactions at the target that contain an AJT 99

etyp99 = EType.forCode('99')
def XXXX(transaction):
	return transaction.containsEType(etyp99) and transaction.containsJournal(0)
target.retainData(XXXX)

containsAccount

This function filters on the specified account.

Argument: Account.

containsBtype

This function filters on the specified manual journal type.

Argument: Manual journal type code.

containsCompany

This function filters on the specified company.

Argument: Company code or an object that is defined in the script.

containsCompanyStructure

This function filters on the consolidation type.

Argument: Consolidation type code or an object that is defined in the script.

containsCounterCompany

This function filters on the specified counter company.

Argument: Counter company code.

containsCounterExtDimMember

This function filters on the specified counter extended dimension member.

Argument: Counter extended dimension member.

containsCurrency

This function filters on the specified currency.

Argument: Currency code or an object that is defined in the script.

containsEType

This function filters on the automatic journal type.

Argument: Automatic journal type code

containsExtDimMember

This function filters on the specified extended dimension member.

Argument: counter extended dimension member.

containsGroup

This function filters on group.

Argument: Group code.

containsJournal

This function filters on the specified journal.

Argument: Journal number.

containsPeriod

This function filters on the specified period.

Argument: Period code or an object that is defined in the script.

getAmount

This function returns the amount from the current object.

getTransAmount

This function returns the transaction amount from the current object.

isBTypeDefined

This function filters on the availability of a manual journal type.

isCompanyDefined

This function filters on the availability of a company.

isCompanyStructureDefined

This function filters on the availability of a company structure.

isCounterCompanyDefined

This function filters on the availability of a counter company.

isGroupDefined

This function filters on availability of a defined group.

isOriginCompanyDefined

This function filters on availability of an origin company.

isTransactionCurrencyDefined

This function filters on availability of a transaction currency.