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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Sort "List" Widget Alphabetically

lorenmc
1-Visitor

Sort "List" Widget Alphabetically

Is there a way to have the "List" widget display it's list of items in an alphabetical order based on the "DisplayField" value?

4 REPLIES 4
paic
12-Amethyst
(To:lorenmc)

You will have to pre-sort the information in the service. There is a service available under the infotable functions called Sort.

lorenmc
1-Visitor
(To:paic)

Hi Pai,

I'm not sure exactly how to implement what you are suggesting given my current design.  I'm populating the "List" widget using the "GetImplementingThingsWithData" service. Simliar to how we did in the training class.  How do I pre sort that list?


Loren



adam11
7-Bedrock
(To:lorenmc)

Loren,

The best practice is to wrap the ThingWorx-provided

Service

 (e.g.,

GetImplementingThingsWithData()

) in your own

Service

. This will allow you to set more granular permissions and in this case, call

GetImplementingThingsWithData()

and pass the

InfoTable

returned to the

Sort()

InfoTableFunction

all in one

Service

.


– Adam



lorenmc
1-Visitor
(To:adam11)

Hi Adam,

I was able to implement your suggestion above for creating a 'sorted' InfoTable by creating my own service.  Thank you. However, when I try and select the property I want in the "DisplayField" of the "List" widget I no longer have access to all the properties like I did when I was using the

GetImplementingThingsWithData()

 service on it's own.  It seems like the only options for the "DisplayField" are now the list of "Generic Properities".  How do I get all the properties to show up?


Thanks


Loren



Announcements


Top Tags