Use Repeater for Multi-Select Operation
The following steps are an example of using repeater for a multi-select operation.
About this task
Procedure
-
Create the following queries:
- Create an application, and then add a page.
- Add a container with six columns.
- Except for the first column, merge the other five columns.
-
Add a repeater and a graph widget to the container, and add a header widget to the
repeater, as shown in the following image.
- The repeater provides a list of devices that the application users can select.
- The graph plots the temperature recorded by the selected devices.
-
Select PAGE DATA, and perform the following steps:
- In the REPEATER PROPERTIES section, in the Flow box, select the query GetDistinctDeviceIDs, and then select the Multi-select and Checked check boxes.
-
In the GRAPH PROPERTIES section:
- In the GRAPH PROPERTIES section, in the Responsive subsection, set the height to 50 percent.
- Select the header widget, and then in the HEADER PROPERTIES section, select Data, and then select M2M_data.device_id from the GetDistinctDeviceIDs query.
-
Select PAGE DATA, and then perform the following
steps:
-
For the GetDistinctDeviceIDs query, point to the row containing
M2M_data.device_id, and then select
. This will create a global variable for the ID.
- For the GetLatestDeviceTemperature query, drag the input DeviceID to the global variable that you have created.
-
For the GetDistinctDeviceIDs query, point to the row containing
M2M_data.device_id, and then select
-
Save the application, and preview it.
The application appears as shown in the following image. You can use the check boxes to display or hide the temperature curve for each device.