Customizing the metamodel > Using ListOf, OneOf, and ExpressionOf > ListOf > Filtering the list of items
  
Filtering the list of items
The list of items for a ListOf command can be filtered by using filter keywords such as OF DEFINITION REFERENCED IN and OF DEFINITION AND SUPERS REFERENCED IN.
Example
The following example shows the code for an object definition, which includes the property “Attributes”, which is a ListOf “Class Attributes”. “Class Attributes” is another definition type, defined in SAPROPS.CFG.
Definition "Object"
{ ...
PROPERTY "Attributes" { ZOOMABLE EDIT LISTOF "Class Attribute" OF DEFINITION REFERENCED IN "Class"
KEYED BY {"Package", "Class Name":"Class", Name} LENGTH 4096
DISPLAY {FORMAT COMPONENT_SCRIPT _FmtNewUMLObjInstAttr LEGEND "$$FORCE$$"}
}
...
}
Example of LISTOF list
The following figure shows the default ListOf dialog created by the LISTOF command. It includes a Choices button which displays a list of all definitions of the referenced type (“Class Attribute” in this example) in the encyclopedia. The OF DEFINITION REFERENCED IN command in the above code specifies that only those class attributes contained in the object’s class are listed.
This graphic is described in the surrounding text.
See also
ListOf