Get Object Count block not working with distinct true

This is my test code -

This is what it returns -

“Orders.OrderDate >= 1664484402395 OR SellersFundraisers[Fundraisers].Orders.OrderDate >= 1664484402395---------0---------100”

The query to the table returns the max number of rows (100), and the query to get the object count returns 0.

If I change the distinct to false on the Get Object Count, I get 7xxx, which makes sense for a non-distinct count.

Is this not how this works?

Hi. Provide please the appId and the full db query (or where clause) you use.
In general – the distinct keyword says that the duplicates should be removed from the answer.

App ID EEE25B20-17FA-97DD-FF29-EC45A5072A00

The full WHERE is in the image above. Do you want me to provide a text version?

Tim

Yes, the text version which can be used in Data -> Data Browser -> Search field.

“Orders.OrderDate >= 1664484402395 OR SellersFundraisers[Fundraisers].Orders.OrderDate >= 1664484402395”

For table Fundraisers.

Hi @Tim_Jones

Thanks for the provided data, I’ve created a ticket BKNDLSS-30097 to investigate the issue.

Regards, Vlad

Thanks, @vladimir-upirov!

Hello @Tim_Jones,

We have investigated this issue. In your case, the following request may be a workaround to count unique records:

https://magicaljelly.backendless.app/api/data/Fundraisers?where=Orders.OrderDate%20%3E%3D%201664484402395%20OR%20SellersFundraisers%5BFundraisers%5D.Orders.OrderDate%20%3E%3D%201664484402395
&property=Count(distinct Type, Status)

Here instead of calling the route with count and distinct=true we call the route for find and in the property value we write "Count(distinct...)" and then you can specify the column names with a comma.

You can also do this in codeless logic by adding Count(distinct...) to the properties parameter

Regards
Nazar

Thanks for the work around!