Skip to main content
Aug 4, 2021 10:15 AM UTC
Solved

how to set rows with custom order in dropdown Thingworx 9.1.1

Hi ,

I have Datatable which contains 20 rows and i have written service which fetch Machine names from this Datatable and displays in Dropdown , but i want order of rows same which is in Datatable. how to achieve this. if we manage it at dropdown also No issue.

 

Thanks,

Vaibhav 

PaiChungAnswer
Aug 5, 2021 12:04 PM UTC

If you need to enforce an order, I recommend you add an order field to your DataTable (assuming there is no suitable field to order on available) and then apply sort to that order field.

3 replies

Aug 4, 2021 1:06 PM UTC

In your service that fetches the data, apply a Sort

Aug 5, 2021 5:14 AM UTC

Hi @PaiChung ,

If we sort in Service, it will return either Ascending or Descending. I want custom order that is how I have inserted in Datatable

in same order dropdown list should hold. If you elaborate more on this , would be better.

 

Thanks,

PaiChungAnswer
Aug 5, 2021 12:04 PM UTC

If you need to enforce an order, I recommend you add an order field to your DataTable (assuming there is no suitable field to order on available) and then apply sort to that order field.