"SELECT DISTINCT" from SmartObject?

  • 12 March 2018
  • 1 reply
  • 18 views

Badge +3

[K2 Five:]

 

Often times, it would be valuable to be able to read only the unique values from a particular column in the data returned from a SmartObject. To use the totally unoriginal example of a car dealer, think about having a database of cars, and wanting to sort them by model. Rather than setting up a separate "Models" list that fuels a dropdown, we'd like to just go through the SmartObject data, see what models we have in the Cars database, and present a list of unique values that can then fuel the filter dropdown's SmartObject. It would be similar to a database's "SELECT DISTINCT <field> FROM <table>" syntax.

 

Is this possible in K2 Five? Maybe by creating a SmartObject that queries another SO, which then populates itself with the data to be used as a data source?


1 reply

Userlevel 6
Badge +16

Hi,



I haven't tested it yet. Maybe it's possible with this community broker.


https://community.k2.com/t5/K2-blackpearl/ADO-Query-Service-Broker/ba-p/62327#

Reply