Typescript OSDK 2.0 not respecting filters in groupBy

We have a use case that requires a GROUP BY on an Object Type and a HAVING clause to restrict the results to a specific period.

Issue 1: It seems we need to apply filter here which is not working.

Issue 2: Is there a simple way to extract actual values without showing type stuff for the custom object return?

Please point me to docs or spec where I can see some kind of cheatsheet with sample selects, filters, aggregations and groupby queries. AIP assist and documentation jumping between legacy and 2.0 versions.

The latest OSDK v2 does not have a $filter on the aggregation request, but we do support filtering object sets, which can be used for this. Can you share what version of '@osdk/client` you are using?

You can achieve this by using a search filter. You can find documentation in developer console under Ontology SDK Documentation → YOUR OBJECT TYPE → Filtering.

await client(REDACTED).where({period: {$eq: "Month Ending June 2025"}}).aggregate()...
1 Like

We did end up using where clause. Thanks.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.