Hi Anita, you hit a good missing topic in the pyqgis documentation. I see very often people asking for support on Expressions and their use in pyqgis.
What do you think to add the example also in the pyqgis documentation directly? Since the last meeting we also have the test framework ready to go [0] that helps a lot to have strong code snippet. Having all the pieces in one box is the best solution IMHO Cheers and thanks Matteo [0] https://docs.qgis.org/testing/en/docs/documentation_guidelines/cookbook_guidelines.html On 5/20/19 9:01 AM, Anita Graser wrote: > > > On Mon, May 20, 2019 at 2:37 AM Nyall Dawson <nyall.daw...@gmail.com > <mailto:nyall.daw...@gmail.com>> wrote: > > On Mon, 20 May 2019 at 01:21, Anita Graser <anitagra...@gmx.at > <mailto: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 > _______________________________________________ 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