On Mon, May 20, 2019 at 2:37 AM Nyall Dawson <nyall.daw...@gmail.com> wrote:
> On Mon, 20 May 2019 at 01:21, Anita Graser <anitagra...@gmx.at> wrote: > > I'd like to add an example of an aggregate expression to my recent > PyQGIS 101 tutorial on expressions [0]. I got expressions for individual > features working but cannot figure out how to set the context for aggregate > expressions correctly. > > As far as I can tell, the PyQGIS Cookbook doesn't contain any > information on this either [1]. > > You aren't correctly constructing your expression context: > ... A documentation update covering this would be most welcome ;) Thank you Nyall, that's really helpful! The expression system is awesome and powerful but I don't think anyone could guess how to use it correctly in PyQGIS. I'll write it up into a tutorial and the documentation team is always welcome to reuse the content in the official documentation. Regards, Anita
_______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer