Specify 7 and multiple table aggregators in queries

Several of our collections have multiple table aggregators assigned to various tables. We use these in the label and reports, most importantly. When I run a query in Specify 7 the first one defined in the DataObjectFormatter xml for that table, is always used, even if it is not the default. In Specify 6, the way we set a non-default aggregator in a query, was to export it, modify the ‘formatName’ attribute of the xml node for that field, then re-import the query. When I try the same thing in the json of an exported query, then re-import it, it ignores the change and the first aggregator defined in the DataObjectFormatter is still used. I have found a workaround by just moving the default aggregator in the DataObjectFormatter to be the first in order, but would like to know if there is a way to assign other aggregators to aggregated query fields. I don’t seem to figure out a way to do that, or maybe I’m ignoring something.

Hi @twilson,

Thank you for reaching out to us about this issue with multiple table aggregators in Specify 7. I understand that you are experiencing some difficulties with setting a non-default aggregator in a query.

Interestingly enough, one of our developers identified the same issue issue just a day after your message (we are engineering a visual interface for customizing table formats and table aggregations now). He created an issue on GitHub here:

At this time, Specify does not currently support assigning a specific table aggregation to an (aggregated) query field, but it will be included in the next Specify update (7.9.4)!

In the meantime, your workaround of rearranging the default aggregator in the DataObjectFormatter is workable as a temporary solution. I apologize for any inconvenience this may have caused and please let me know if there is anything else I can assist you with.