-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Layer variables missing from Field Calculator algorithm on QGIS 3.16.1 #40255
Comments
Ok, looks like the variable is expanded OK when processing algorithm is run, but it is not shown in the list of available expressions and not in the auto-complete list |
@PeterPetrik I didn't notice you assigned yourself the issue and I was dealing with this one too. I think I found what the problem is, can I proceed with a PR or do you want to fix it yourself? |
Ok, feel free to assign to yourself and proceed. For future it is safer if you assign ticked to yourself when starting with it :) I think moving the processing alg to C++ (https://github.com/qgis/QGIS/blame/master/src/analysis/processing/qgsalgorithmfieldcalculator.cpp) , @suricactus forgot to add project/layer to expression context |
Oops, true that. Thanks for taking care of that. |
Sure, sorry about that! |
Fixes qgis#40255 (cherry picked from commit 76cc050)
The expression engine is not able to access @layer and @layer_name variables from Field Calculator. They work fine elsewhere, i.e. via field calculator, or select by expression, but not from the Processing Toolbox. This works fine on 3.10 so it's a regression.
![layer](https://user-images.githubusercontent.com/5227506/100081644-43e00580-2e6d-11eb-9020-853ae23578e7.png)
QGIS and OS versions
The text was updated successfully, but these errors were encountered: