cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Filter Data and Remove repeated display of data in dropdown list.

alenaromi
12-Amethyst

Filter Data and Remove repeated display of data in dropdown list.

Hi ,

So I have a list which I want to act as a filter such that based on my selection the grid displays on those data.For eg.I select company ABC ,only those rows of company ABC are displayed on the screen and when selection is removed it goes back to displaying the full list.

 

Now I have two Things that share the same company name ABC,and as it is a dropdown it show "ABC" twice in the list.As I have a filtering purpose the name being displayed once is more than enough,so is there a way I can make it display only once so as to reduce extra list rows and improve the UI.

 

Please refer image for better understanding,also I have bound the dropdown lists and the grid to a thing template which is the base for all the things.

 

ACCEPTED SOLUTION

Accepted Solutions

Hi ,

 

Data which you are binding to list widget  first needs to be filtered for getting the distinct records. You may write down One service to get the distinct records in similar way as shown below. Output of this service then can be bind to list widget.

 

var params = {
t: undefined /* INFOTABLE */,
columns: undefined /* STRING */
};

// result: INFOTABLE
var result = Resources["InfoTableFunctions"].Distinct(params);

View solution in original post

2 REPLIES 2

Hi ,

 

Data which you are binding to list widget  first needs to be filtered for getting the distinct records. You may write down One service to get the distinct records in similar way as shown below. Output of this service then can be bind to list widget.

 

var params = {
t: undefined /* INFOTABLE */,
columns: undefined /* STRING */
};

// result: INFOTABLE
var result = Resources["InfoTableFunctions"].Distinct(params);

Hey!
I wrote a service like you said for each of my fields separately i.e (one for city name,one for state name etc) and it seems to be working fine.
Thanks a lot.

Announcements


Top Tags