How to Use Text
Setting the Text to Display
Set the text to be displayed. You can set either a fixed value or a dynamic value.
Displaying the Return Value from a dataflow
Refer to the value from a dataflow named countUsers
.
- Click [Create] from the dataflow list.
- Change the dataflow name next to the [Run] button to
countUsers
. - Select [Onboarding DB] in [Select resource].
- Enter the following SQL in [SQL]:
```sql SELECT COUNT(*) as count from users; ```
- Click [Run].
- Drag & drop a [Text] component from the right tab onto the canvas.
- In the [Text] component, write
{{ String(countUsers.data[0].count) }}
.
Displaying Data from a Selected Row of a Table
Display the email address of the selected user.
- Click [Create] from the dataflow list.
- Change the dataflow name next to the [Run] button to
listUsers
. - Select [Onboarding DB] in [Select resource].
- Enter the following SQL in [SQL]:
```sql SELECT * from users; ```
- Click [Run].
- Drag & drop a [Column] onto the canvas.
- Drag & drop a [Table] to the left side of the [Column].
- Enter
{{ listUsers.data }}
in [Data] of the [Table]. - Drag & drop a [Text] to the right side of the [Column].
- With the text selected, enter
{{ table1.selectedRow.data.email }}
in [Text] in the [Inspect]. - Confirm that the display changes when the selected row in the table is changed.
Using Markdown Syntax
By selecting the text component and changing [Display mode] to [Markdown], you can write using markdown syntax.
It complies with the formats supported by GitHub's Basic writing and formatting syntax (opens in a new tab).