How to display distinct field row in list view when initializing

  • 22 March 2018
  • 1 reply
  • 89 views

Hi all

I would like to create a list which display distinct field but I have no idea how to do it.

(Attached listview.png) is a 'List View' which only display 'Alias' field. It is extracted from a SMO (attached full table.png) generated frm SQL server.

For instance, 'CSM' have two data, however I would like to only display once when the list view is initialized. 

similar reference as: https://community.k2.com/t5/K2-blackpearl/Duplicate-value-in-listview-row/m-p/86164.

But the above case did not remove duplicate rows.

I also thought of using filter in list method however I cannot determine a single ID to be inputted in the SMO when the view is initializing. (It is the Alias to filter, not a particular ID record)

 

And help would be appreciated!

 

 


16943i918197B57630457F.png
11265iE9125923A86B2FE1.png


1 reply

Badge +12

Hi,

You may consider creating a stored procudure that lists out all the distinct entries of that column. From this stored proc, you can create a list view to display all the unique values.


 


Another option is to use the ADO Service Query Broker available in the Markethttps://community.k2.com/t5/K2-blackpearl/ADO-Query-Service-Broker/ba-p/62327. It supports the DISTINCT keyword so this should be able to return the desired results.

Reply