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

Field calculator "lpad()" operator does not work #23559

Closed
qgib opened this issue Sep 29, 2016 · 3 comments
Closed

Field calculator "lpad()" operator does not work #23559

qgib opened this issue Sep 29, 2016 · 3 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Expressions Related to the QGIS expression engine or specific expression functions

Comments

@qgib
Copy link
Contributor

qgib commented Sep 29, 2016

Author Name: Roy Roge (Roy Roge)
Original Redmine Issue: 15636
Affected QGIS version: 2.14.6
Redmine category:field_calculator


Tested on a text field:

example:

1
2
3

lpad("fieldname", 2,'0')

expected result:

01
02
03

Thanks, Roy.
actual result:

1
2
3

@qgib
Copy link
Contributor Author

qgib commented Oct 2, 2016

Author Name: Nyall Dawson (@nyalldawson)


I can't reproduce - are you sure you aren't storing the result in a numeric field?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Oct 3, 2016

Author Name: Roy Roge (Roy Roge)


I'm quite sure because rpad was working properly,
anyway i cannot reproduce anymore and closing,
if i'll understand what was happening i'll reopen a new one,
thanks.


  • status_id was changed from Feedback to Closed

@qgib
Copy link
Contributor Author

qgib commented Oct 3, 2016

Author Name: Roy Roge (Roy Roge)


Maybe I was actually using a numeric field,
that would explain why only rpad was working
(10, 20, 30 are indeed legit numbers), sorry for the mess.

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Expressions Related to the QGIS expression engine or specific expression functions labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Expressions Related to the QGIS expression engine or specific expression functions
Projects
None yet
Development

No branches or pull requests

1 participant