Skip to main content

Data

You can choose how the retrieved data is passed into the Dynamic Text Panel.

  • Every row means that the Content template is applied to every retrieved row.
  • All rows, the query results are passed entirely as the data field to the template.

To work with the query results as a whole, you can use #each builtin helper to iterate over the records.

Every row

If your data source returns the following four columns of data.

| app  | description                  | cluster | tier     |
| ---- | ---------------------------- | ------- | -------- |
| auth | Handles user authentication. | prod | frontend |

Template

Display it using the following template for each row.

# {{app}}

> {{description}}

{{#if (eq tier "frontend")}}
Link: <a href="https://{{cluster}}.example.com/{{app}}">https://{{cluster}}.example.com/{{app}}</a>
{{/if}}
Display application data using Handlebars, Markdown and HTML.
Display application data using Handlebars, Markdown and HTML.

Render a single template (All rows)

For the following query result.

titleauthoryear
DuneFrank Herbert1965
1984George Orwell1949

Template

Given that All Rows is selected, the following template renders a table from the query result.

| Title | Author | Year |
| ----- | ------ | ---- |
{{#each data}}
| {{title}} | {{author}} | {{year}} |
{{/each}}
Visualize returned data as a table.
Visualize returned data as a table.