Bug report #8447
Label $area and field
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Labelling | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | invalid |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 17216 |
Description
I´m trying to set a label with the function $area. This works fine. Also with formating ex 1 decimal.
With $area || 'text' the formatting for decimals fails
History
#1 Updated by Giovanni Manghi over 11 years ago
- Operating System deleted (
Windows and MAC) - Assignee set to Larry Shaffer
I had once reported the same issue here #6981 and it was closed because in the expression builder there are now number formatting functions. It is up to you to keep this open or closing it for the same reason.
#2 Updated by Nathan Woodrow over 11 years ago
- Resolution set to invalid
- Status changed from Open to Closed
The format option doesn't work on anything but pure numbers being returned. Once you use || you are returning a string and we can't format that. Use the format_number
function
#3 Updated by Nathan Woodrow over 11 years ago
- Assignee deleted (
Larry Shaffer)