1 Reply Latest reply on Jan 19, 2018 10:07 AM by gprasad-2 RSS
    gprasad-2 Newbie

    How do I bring elements of seecond list after selecting a button in the first link?

    I have to design a UI where in the first link i have some departments. And in the second link i have the papers under the department. So how do I bring this type of design? The first link above contains the departments. If we select a department then the papers under the department should be displayed in the second list. So please do tell me how do I do it???

      • Re: How do I bring elements of seecond list after selecting a button in the first link?
        brucehul Apprentice

        In your List widget, you have a service whose results populates the choices (binds to the Data for the List). When you select an item in the list, that will select one of the items in the data result from the service.


        However, Thingworx does not have a selection event coming off the widget. Instead, the event comes from the data set that populated the widget. This is different than most GUI environments, but it is the reason it is fairly easy to make dashboards. When the data set triggers the selection change, it will affect any widget that uses that same dataset. That means that a list of devices and a Google Map can share the same dataset and if either widget makes a selection, it will immediately be reflected in the other widget's selection.


        So, to use this, in Composer, select the service that populates the first pulldown. In the lower right, you will see a Selected Rows Changed event. This is the event you use to trigger the service to populate the next pulldown. Here's a sample...



        So this shows using a GetEntityList service to pull all of the ThingTemplates in the system. When you select one of them from the first pulldown, it will push the selected name as a parameter and execute GetPropertyDefinitions whenever the selection changes. While this specific example doesn't actually run, it shows you how to do the wiring.


        The import thing is that the selection event comes off the SERVICE and not the WIDGET.