Skip to content
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

@rownum variable not working in lesson 14.5 #9112

Closed
davidgilbertson opened this issue May 19, 2024 · 2 comments · Fixed by #9113
Closed

@rownum variable not working in lesson 14.5 #9112

davidgilbertson opened this issue May 19, 2024 · 2 comments · Fixed by #9113

Comments

@davidgilbertson
Copy link

davidgilbertson commented May 19, 2024

Description

Page URL: https://docs.qgis.org/3.34/en/docs/training_manual/forestry/systematic_sampling.html

This page refers to a variable @rownum which doesn't exist in the current QGIS version. There's now a @row_number variable but that appears to not work (in the preview, it is always 1) and when I actually create the field, it doesn't populate at all.
image

image

DelazJ added a commit to DelazJ/QGIS-Documentation that referenced this issue May 20, 2024
@DelazJ
Copy link
Collaborator

DelazJ commented May 20, 2024

@davidgilbertson Indeed, it should be @row_number (see #9113)
I tested the expression with another layer and it worked as expected. It however fails (I got Null values and not 'P_') when I also checked the "create virtual field" as you did in your screenshot. Mind unchecking that option, set appropriate field length and retry?

DelazJ added a commit that referenced this issue May 20, 2024
qgis-bot pushed a commit that referenced this issue May 20, 2024
DelazJ added a commit that referenced this issue May 20, 2024
@davidgilbertson
Copy link
Author

Yep, that works, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants