AsExprList
String functions AsExpr(ession)List
syntax
- AsExprList(string_dataitem)
- AsExprList(string_dataitem, relation)
definition
- AsExprList(string_dataitem) results in a string Parameter with all values of string_dataitem, semicolon delimited and single quoted.
- AsExprList(string_dataitem, relation) results in a string Attribute with all values of string_dataitem, semicolon delimited and single quoted, grouped by the relation Argument. The Domain unit of the resulting attribute is the Values unit of the relation.
applies to
- Data item string_dataitem with string Value type
- relation with value type of the group CanBeDomainUnit
conditions
The domain units of arguments string_dataitem and relation must match.
example
1. parameter<string> CityListParam := AsExprList(City/Name);
result = 'Groningen';'Delfzijl';'Winschoten';'Leeuwarden';'Dokkum';'Bolsward';'Emmen';'Assen';'Hoogeveen'
2. attribute<string> CityList (Region) := AsExprList(City/Name, City/Region_rel);
| City/Name | City/Region_rel |
|---|---|
| ‘Groningen’ | 0 |
| ‘Delfzijl’ | 0 |
| ‘Winschoten’ | 0 |
| ‘Leeuwarden’ | 1 |
| ‘Dokkum’ | 1 |
| ‘Bolsward’ | 1 |
| ‘Emmen’ | 2 |
| ‘Assen’ | 2 |
| ‘Hoogeveen’ | 2 |
domain City, nr of rows = 9
| CityList |
|---|
| ‘Groningen’;’Delfzijl’;’Winschoten’ |
| ‘Leeuwarden’;’Dokkum’;’Bolsward’ |
| ‘Emmen’;’Assen’;’Hoogeveen’ |
domain Region nr of rows = 3