# Table Widget

**General Setting**

User can change following things in Table widget:

* Name for widget which will be used data referenceFor Example, if widget name is 'Table', then data of widget is referenced as Table.data
* Show title - User can show/hide widget title
* Title Color
* Background Color

![Configure Table Widget](/files/gGM7Fi11G5NXWLSm1plF)

**Widget Setting**

In Widget Setting option, user can change following parameters:

* Filename - User can change name of Exported file. Default file type is .xlsx and default file name is 'thingsup.xlsx'.

![Configure Table Widget](/files/dmKNoTa07DDPg7AhwAGc)

#### Source <a href="#source" id="source"></a>

User can select a source mode as MQTT or Action.

**Using MQTT**

Here, to change value of Text Widget user can publish JSON array on given **testData** MQTT topic. No need to provide \<account\_id> while providing the MQTT topic. The JSON array will be as below.

```
//Example 

[{ 
  "ID":1,
  "Name":"John"
},
{ 
  "ID":2,
  "Name": "Andrew"
},
{ 
  "ID":3,
  "Name":"Peter"
}]


// Here, ID and Name will be the Table Headers. And each Json object of the given
array is consided as unique row in table.
```

![Configure Table Widget](/files/SlLJo0D2xqz8BiEIxFmD)

**Using Action**

Here, to update the table widget, output of the action should contain JSON array as given format in above example. User can also update the widget either onLoad or periodically by providing refresh interval.

![Configure Table Widget](/files/tV3c57XKozW1N4Kp77s4)

#### Event Handling

Table widget does not support any event.

#### Example

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

```
[
  {
    "ID": "121",
    "Name": "John"
  },
  {
    "ID": "S122",
    "Name": "Andrew"
  },
  {
    "ID": "S123",
    "Name": "Peter"
  }
]

// Here, ID and Name will be the Table Headers. And each Json object of the given
array is consided as unique row in table.
```

![Table Widget Example](/files/sXf57YvwfoewgRqEtLvS)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thingsup.io/widgets/table-widget.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
