# HTML table

The HTML table allows for the usage of HTML code to customize and present data. The source of the data can either be directly from a database or through a workflow. The HTML table portlet is, by default, wrapped as a table.

## General

General data is required for all portlets.

[General configuration](/development/flow-portal-2/portlets/common-configuration.md#general)

## Listeners

The portlet can listen to the following events:

* On Row Selection
* On Refresh
* On Point Selection

<div align="left"><img src="/files/-M8tdX9KoUxjxEGK1TEF" alt=""></div>

[Listeners configuration](/development/flow-portal-2/portlets/common-configuration.md#listeners)

## Data

### Data source

The portlet data source configuration enables the portlet to execute specified queries towards the chosen database connector to fetch data, or fetch data from a workflow.

* Database: uses a flow connector to retrieve data from a database
* Workflow: runs a workflow to retrieve data

[Data source configuration](/development/flow-portal-2/portlets/common-configuration.md#database-source)

[Workflow source configuration](/development/flow-portal-2/portlets/common-configuration.md#workflow-source)

### Data source columns

Manage: the columns can be configured as a grid view as well as the list view. This view can help for a better overview and quicker configuration when a lot of columns are in use.

Click *Execute* in the data source section to fetch the columns. Each column can be configured with:

* display name
* column type

There are a number of column types to choose from. The default column type is text.

* Text: use to display column as a text fields
* Number: use for number fields where the number is an integer
* Decimal: use for numbers with decimals
* Date: will display the column as a date with no time
* Date & Time: use to display date and time

### Default presentation

<div align="left"><img src="/files/-M0cMY09VrTUHk-MfLWJ" alt=""></div>

## Content

In the table header and body sections, use HTML to configure the portlet content.

{% tabs %}
{% tab title="Content" %}

<div align="left"><img src="/files/-M1VxpVbgqEFqvBycveE" alt=""></div>
{% endtab %}

{% tab title="Preview" %}

<div align="left"><img src="/files/-M1Vy5qDCSFXjvHqgarR" alt=""></div>
{% endtab %}
{% endtabs %}

## Style

Change the header text color and add a header stripe by configuring style.

[Style configuration](/development/flow-portal-2/portlets/common-configuration.md#style)


---

# 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://help.novacuraflow.com/development/flow-portal-2/portlets/basic/html-table.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.
