Skip to Content
0
Dec 06, 2022 at 11:34 AM

BTP SDK iOS - OData Distinct values

494 Views Last edit Dec 08, 2022 at 02:16 PM 2 rev

Hi All,

We are using the offline oData functionality in our iOS application using the BTP SDK for iOS. Here we are trying to get a distinct set of values for an particular non key column from an entity set using the DataQuery class.

We are using OData version 2.0 and I see that there is an method SelectDistinct which could be used to return distinct values, but we are not sure how it would work as the documentation is pretty unclear. When we tried, it didn't work properly and it still returned duplicate values.

Link: https://help.sap.com/doc/978e4f6c968c4cc5a30f9d324aa4b1d7/Latest/en-US/Documents/Frameworks/SAPOData/Classes/DataQuery.html#/s:8SAPOData9DataQueryC14selectDistinctyAcA12PropertyPathCd_tF

screenshot-2022-12-06-170205.jpg

Hence could anyone please help us here regarding select distinct items from an entity set for an property?

Thanks & Regards,

Vishal

Attachments