QGIS/resources/function_help/json/concatenate_unique
Nyall Dawson 2e5257372b [FEATURE] Add order by support to expression aggregate and concatenation functions
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
2019-05-10 06:23:56 +10:00

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"}
]
}