-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new variable form of current feature expression functions #50134
Conversation
How about adding a note in the functions help that they can be replaced by the variables? The variables will then be more exposed to users and people won't be confused by seeing "duplicate" items. |
@nyalldawson A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged. Please update the description (not the comments) with helpful description and screenshot to help the work from documentors. Thank you! |
Good idea, done |
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).
8b8cdfc
to
e42a67d
Compare
I've had to go with just "@feature" here instead -- unfortunately "@current_feature" has already been used elsewhere (in forms) |
@nyalldawson |
Hi @nyalldawson, It seems there is an issue with the new |
This adds a newer style variable form of referencing the current feature and its attributes in expressions.
The newly introduced variables are:
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).