How to get count from an Odata Entity at consumers end.

0
I have an Odata entity at Project A which is being used by Project B. In project B I want to find the count of that entity in a microflow.
asked
3 answers
0

In OData (v4) you have the $inlineCount and $count query options that can be used to retrieve the amount of records.

 

https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#count

 

 

 

answered
0

See http://localhost:8080/odata-doc/

 

http://localhost:8080/sample/odata/v1/Customers/$count

 

If you to filter on only projects with Parent project (replace ParentCustomer with ParentProject)

 

http://localhost:8080/sample/odata/v1/Customers?$expand=ParentCustomer&$filter=ParentCustomer ne null&$count=true&$top=0

 

 

answered
0

If you use External Entities you can do it the same way as for persistent entities: a retrieve and count in a microflow will only call the count on the rest api. See the trace message in the screenshot.

 

image.png

answered