Skip to main content
1-Visitor
December 22, 2014
Question

Sort "List" Widget Alphabetically

  • December 22, 2014
  • 4 replies
  • 2830 views

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

    1-Visitor
    January 5, 2015

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

    lorenmc1-VisitorAuthor
    1-Visitor
    January 7, 2015

    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



    5-Regular Member
    January 7, 2015

    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