selection-functions select_with_org_rel


  • select_with_org_rel(condition)
  • select_uint8_with_org_rel(condition)
  • select_uint16_with_org_rel(condition)
  • select_uint32_with_org_rel(condition)
  • select_uint64_with_org_rel(condition)


select_with_org_rel(condition) results in a new 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 resulting value-type of the domain unit is derived from the domain unit of the condition argument:

  • uint32 for conditions with uint32, boolean, spoint or wpoint value type
  • uint8 for conditions with uint8 value type
  • uint16 for conditions with uint16 value type
  • uint64 for conditions with uint64, ipoint or upoint value type

Between versions 8.44 and 8.7.2 the name select_orgrel was used for the select_with_org_rel function.

The explicit select_uint8_with_org_rel, select_uint16_with_org_rel, select_uint32_with_org_rel and select_uint64_with_org_rel functions can be used in the same manner as the select_with_org_rel function, to create a new domain unit with the explicit value type.


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

The select_with_org_rel and subset functions are similar, the only difference is that the subitem generated by the subset operator is called: Nr_OrgEntity, a name that does not meet with our naming-conventions.

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

See this overview for when to choose which selection operator is feasable.

applies to

  • condition must be a boolean attribute or subexpression resulting in boolean values.

since version



unit<uint32> ZHCities := select_with_org_rel(City/RegionCode == 200)
   attribute<string> name := org_rel -> Name;
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/org_rel ZHCities/name
1 Rotterdam
3 Den Haag

domain ZHCities, nr of rows = 2

see also