Bug report #14939

Cannot use virtual field for styling if it uses values from another virtual field

Added by Joseph Liam over 4 years ago. Updated over 4 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Virtual Fields
Affected QGIS version:2.14.3 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:22890

Description

If you create a virtual field "v_field_1" in a shapefile which contains values, you can style the layer using this field such as Categorized or Graduated style.

But if you create another virtual field "v_field_2" which takes values from "v_field_1" (e.g. using a simple expression like: "v_field_1"), then "v_field_2" cannot be styled. When you go to either the Categorized or Graduated style and select "v_field_2", it is blank.

I am using QGIS 2.14.3-Essen for Windows 7 64-bit.

Associated revisions

Revision df0d5969
Added by Nyall Dawson over 4 years ago

Fix virtual fields which depend on other virtual fields may not be
calculated in some circumstances (fix #14939)

Revision 91a1d33f
Added by Nyall Dawson over 4 years ago

Fix virtual fields which depend on other virtual fields may not be
calculated in some circumstances (fix #14939)

(cherry-picked from df0d5969aa8e3bf0ec653bb6d6395afe1cf58950)

History

#1 Updated by Joseph Liam over 4 years ago

The values of "v_field_2" are correctly calculated in the attribute table but just don't show up when being styled.

#2 Updated by Nyall Dawson over 4 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF