Project: QGIS

Version: 3.28

Feature: Add new variable form of current feature expression functions

The newer style variable form has been added for 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 a step towards eventually deprecating the older $ style functions, and providing a more consistent approach to expressions instead of an unpredictable mix of @/$.

Older functions and variable references will continue to work (and will likely continue working indefinitely for the sake of compatibility with older projects). They will also continue (for the time being) to be exposed in the UI to avoid user confusion.

This feature was developed by Nyall Dawson