Creating an Attribute Filter Class

Attribute Filter classes must implement the interface SCC_COMMON_ATTRIBUTE_FW:Interfaces:iAttributeFilter. Implementing teams can then code the getter method of EntityID property to return a value based on any runtime data like component buffer values or external table values.

Here is an example of an attribute filter class:

import SCC_COMMON_ATTRIBUTE_FW:Interfaces:iAttributeFilter;

class AIAFilter implements 
SCC_COMMON_ATTRIBUTE_FW:Interfaces:iAttributeFilter

   property Record ParentRecord;

   property string EntityID get;   

end-class;

get EntityID

   /+ Returns String +/

   /+ Extends/implements 
SCC_COMMON_ATTRIBUTE_FW:Interfaces:iAttributeFilter.EntityID +/

   rem Local Rowset &rs = GetLevel0()(1).GetRowset(Scroll.SSR_AIR_HDR);

   Local Record &rec = CreateRecord(Record.SSR_ITEM_TYPE);

   rem &rec.SSR_ITEM_TYPE.Value = 
&rs(CurrentRowNumber(&rs.Level)).SSR_AIR_HDR.SSR_ITEM_TYPE.Value;

   &rec.SSR_ITEM_TYPE.Value = &ParentRecord.SSR_ITEM_TYPE.Value;

   &rec.SelectByKey();

   Return &rec.SCC_ENTITY_ID.Value;

end-get;

The property ParentRecord is populated by the framework with the runtime component buffer object of the parent record. This object can then be used to access other records, rows, rowsets, and so on from the component buffer thereby giving access to any field value in the runtime component.