From ObjectVision

Jump to: navigation, search

Relational functions subset



  • subset(condition)


subset(condition) results in a new uint32 domain unit with a relation to the entries of the domain unit of the condition, for which the values of the condition argument are true.


The subset function generates a subitem, named Nr_OrgEntity. This data item contains the relation towards the domain unit of the condition argument.

The Nr_OrgEntity data item can be used in a lookup function to relate attributes to the new domain, see the example.

applies to

since version



unit<uint32> ZHCities := subset(City/RegionCode == 200)
    attribute <string> name := City/Name[Nr_OrgEntity];
City/RegionCode City/Name
100 Amsterdam
200 Rotterdam
300 Utrecht
200 Den Haag
400 Eindhoven
null Haarlem
400 Tilburg

domain City, nr of rows = 7

ZHCities/nr_OrgEntity ZHCities/name
1 Rotterdam
3 Den Haag

domain ZHCities, nr of rows = 2

Personal tools