Bug report #18684

inserting fields in expression generator uses double quotes instead of simple quotes

Added by Denis Rouzaud over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:Normal
Assignee:Nyall Dawson
Category:Expressions
Affected QGIS version:3.1(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 #:26572

Description

In layout composer, in atlas, when adding a field for an expression as `attribute( @atlasfeature, 'myfield' )` myfield is added with double quotes instead of double quotes

History

#1 Updated by Nyall Dawson over 6 years ago

That's because it's adding the "object_id" attribute for the atlas feature, not the string literal 'object_id'. I.e. get the value for the current fearure of object_id (say, "5"), and then get the attribute from that feature with matching field name (field with name "5").

It's the same behaviour everywhere with expressions.

#2 Updated by Denis Rouzaud over 6 years ago

  • Resolution set to invalid
  • Status changed from Open to Closed

right, of course.
sorry for the noise

Also available in: Atom PDF