[Qgis-user] relation_aggregate

Seggie, Graeme Graeme.Seggie at sepa.org.uk
Wed Apr 6 01:53:21 PDT 2022


PUBLIC


Hello,

I am having issues getting relate_aggregate to do anything within expression builder. Ideally, I would like a features (1) to (m) attributes table setup correctly with a relationship to allow a user to select attributes based on attribute criteria have the corresponding related features selected / shown on map as related. Given how little I am uncovering online about ways to do this, it might not be possible, but even getting the expression builder to update a field in my features with a count of corresponding values in attributes is not updating feature's values, I am wondering if I am doing something wrong. Should this work?

Within select by attributes for the feature table:
relation_aggregate( 'relation _ID','count',1) > 3

The preview of the expression returns a value for a feature (without the >3 at end), but when I try to calculate a field of this count - every value returns NULL. With the >3 it does not work at all to select anything.

It does look like 'relation_aggregate( 'relation _ID','count',1)' is fine for the basis of evaluating a field of values based on preview but it returns null on running the field calculator.

I am using QGIS 3.16

Regards,
Graeme


PUBLIC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220406/d3a0115f/attachment.html>


More information about the Qgis-user mailing list