rlookup
- Details
- Last Updated on Saturday, 19 January 2013 21:41
syntax
-
rlookup(a, b)
definition
rlookup(a, b) results in a attribute with the index numbers of the domain unit of attribute b for the domain of data item a.
- a: data item, e.g. a region code
- b: an attribute with the same relation attribute values as data item a, for the domain of attribute b. For the domain unit of attribute b, this attribute needs to be a primary key.
applies to
Data item a and attribute b with value types:
- groups: Numeric, Point
- uint2
- uint4
- bool
- string
conditions
Data item a and attribute b need to match with regard to their:
since version
5.15
example
attribute<RegionDomain> rlookupRegion (RegionDomain):
expr = "rlookup(City/RegionEK, Region/RegionEK)";
| City/RegionEK | rlookupRegion | |
| 100 | 0 | |
| 200 | 1 | |
| 300 | 2 | |
| 200 | 1 | |
| 400 | 3 | |
| null | null | |
| 400 | 3 |
| Region/RegionEK |
| 100 |
| 200 |
| 300 |
| 400 |
| 500 |