Thingsup Docs
  • Documentation
  • MQTT
    • MQTT Broker
    • Add MQTT Device
    • Authorize MQTT Device
    • Test MQTT Connection
    • Tutorial - MQTT Basics
  • Connections
    • MySQL Connection
    • Redis Connection
    • InfluxDB Connection
    • AWS Connection
    • PostgreSQL Connection
    • MQTT Connection
    • InfluxDBv2 Connection
    • Firebase Connection
    • MSG91 Connection
  • Actions
    • MySQL Query Action
    • Redis Query Action
    • InfluxDB Read Query Action
    • InfluxDB Write Point Action
    • Send Email Action
    • DynamoDB PutItem Action
    • DynamoDB UpdateItem Action
    • DynamoDB GetItem Action
    • DynamoDB Query Action
    • DynamoDB Scan Action
    • DynamoDB DeleteItem Action
    • PostgreSQL Query Action
    • InfluxDBv2 Read Query Action
    • InfluxDBv2 Write Point Action
    • Firebase Cloud Firestore Action
    • Firebase RealTime Database Action
    • Firebase Messaging Action
    • AWS Lambda Invoke Action
    • AWS SQS Send Messsage Action
    • Publish MQTT Message Action
    • MQTT CommandResponse Action
    • ProcessFunction Action
    • WebHook Action
    • Push to Thingsup Track Action
    • Send MSG91 SMS Action
  • Rules
    • MQTT Rules Engine
    • HTTP API
  • Command
    • HTTP Command
    • Action Command
  • Alerts
    • Basic Alert
  • Dashboards
    • Add Dashboard
    • Dashboard Settings
  • Widgets
    • Button Widget
    • Data Text Widget
    • Toggle Switch Widget
    • Image Switch Widget
    • Dropdown Widget
    • LED Widget
    • Text Widget
    • Navigation Button Widget
    • Form Widget
    • Date Picker Widget
    • Date Time Range Widget
    • Slider Widget
    • Table Widget
    • Google Map Widget
    • Data Tile Widget
    • HTML Tile Widget
    • Line Chart Widget
    • Bar Chart Widget
    • Pie Chart Widget
    • Scatter Chart Widget
    • Radar Chart Widget
    • Radial Gauge
    • Linear Gauge
Powered by GitBook
On this page

Was this helpful?

  1. Widgets

Dropdown Widget

PreviousImage Switch WidgetNextLED Widget

Last updated 3 years ago

Was this helpful?

General Setting

User can change following things in Dropdown widget:

  • Name for widget which will be used data referenceFor Example, if widget name is 'Dropdown', then data of widget is referenced as Dropdown.data

  • Show title - User can show/hide widget title

  • Title Color

  • Background Color

Widget Setting

In Widget Setting option, user can change following parameters:

  • Label Key - Key parameter in key-value pair of input JSON Object which will get added to dropdown.

  • Label Value - Value parameter in key-value pair of input JSON Object which will get added to dropdown.

  • Fixed List - User can provide fixed list by enabling this option. Fixed list items either will be in <value,label> or <value> format.

  • Multi Select - Enable this option of multi selection.

Source

User can select a source mode as MQTT or Action.

Using MQTT

Here, to add option to dropdown list user need to send data in given format on given MQTT topic. No need to provide <account_id> while providing the MQTT topic. The JSON object will be as below.

[{"labelkey":"bike","labelvalue":50}]
[{"labelkey":"scooter","labelvalue":30}]

// 'labelkey' and 'labelvalue' is set as LabelKey and LabelValue in widget form.

Using Action

Here, to add option to dropdown list, output of the action should contain key-value pair with 'labelKey' and 'labelValue' keys. User can also update the widget either onLoad or periodically by providing refresh interval.

Event Handling

Dropdown widget does not support any event.

Example

If we configure Dropdown Widget as below:

  1. Label Key - labelkey

  2. Label Value - labelvalue

  3. Fixed List - Disabled

  4. Multiselect -Disabled

and set source type for widget as MQTT and topic configured is 'data'. And if we publish following JSON array over 'data' topic then Dropdown Widget will look as shown in image.

// Data over configured MQTT Topic

[
  {
    "labelkey": "wolf bike",
    "labelvalue": 50
  },
  {
    "labelkey": "Monster bike",
    "labelvalue": 60
  }
]
Configure Dropdown Widget
Configure Dropdown Widget
Configure Dropdown Widget
Dropdown Widget Example