mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
This adds a newer style variable form of referencing the current feature and its attributes in expressions. The newly introduced variables are: - @feature: a replacement for $currentfeature, contains the current feature - @id: a replacement for $id, contains the current feature id - @geometry: a replacement for $geometry, contains the current feature geometry This is intended as a step towards eventually deprecating the older $ style functions, and providing a more consistent approach to expressions instead of the older unpredictable mix of @/$. For now these old functions still work (and likely will ALWAYS remain working for old project compatibility), AND they are also still exposed in the UI just to avoid user confusion (eventually we can hide them).
12 lines
589 B
Plaintext
12 lines
589 B
Plaintext
{
|
|
"name": "$currentfeature",
|
|
"type": "function",
|
|
"groups": ["Record and Attributes"],
|
|
"description": "Returns the current feature being evaluated. This can be used with the 'attribute' function to evaluate attribute values from the current feature. <b>WARNING: This function is deprecated. It is recommended to use the replacement @feature variable instead.</b>",
|
|
"examples": [{
|
|
"expression": "attribute( $currentfeature, 'name' )",
|
|
"returns": "value stored in 'name' attribute for the current feature"
|
|
}],
|
|
"tags": ["evaluated", "attribute", "current", "evaluate"]
|
|
}
|