mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
Because certain aggregates and concatenation requires results in a certain order, this change allows specific control of the order features are added to the aggregate during an expression evaluation. E.g. concatenate("Station",concatenator:=',', order_by:="Station") will give a comma separated list of station names in alphabetical order, rather than layer feature order. Sponsored by SMEC/SJ
16 lines
902 B
Plaintext
16 lines
902 B
Plaintext
{
|
|
"name": "concatenate_unique",
|
|
"type": "function",
|
|
"description": "Returns all unique strings from a field or expression joined by a delimiter.",
|
|
"arguments": [
|
|
{"arg":"expression", "description":"sub expression of field to aggregate"},
|
|
{"arg":"group_by", "optional":true, "description":"optional expression to use to group aggregate calculations"},
|
|
{"arg":"filter", "optional":true, "description":"optional expression to use to filter features used to calculate aggregate"},
|
|
{"arg":"concatenator", "optional":true, "description":"optional string to use to join values"},
|
|
{"arg":"order_by", "optional":true, "description":"optional expression to use to order features used to calculate aggregate"}
|
|
],
|
|
"examples": [
|
|
{ "expression":"concatenate(\"town_name\",group_by:=\"state\",concatenator:=',')", "returns":"comma separated list of unique town_names, grouped by state field"}
|
|
]
|
|
}
|