Skip to main content
waffle.svg
Domo Knowledge Base

Dynamic Textbox

Intro

Like a standard Textbox, a Dynamic Textbox is used to build cards containing text. The difference is that with a standard Textbox, the text in the box comes directly from the DataSet, and only one macro is available; this macro lets you dynamically reference the first value in your selected value column. In a Dynamic Textbox, you enter the text yourself, but more than a dozen macros are available, allowing you to reference information from your selected category and value columns such as change percentage, column names, first/last/penultimate value, minimum/maximum/average value, first or last category, and so on. This allows you to build text cards with dynamic fields that update anytime your data updates. In the following example card, all of the called-out fields are set to update dynamically based on the content in the DataSet:
 

dynamic_textbox_example.png


The text can be as long as you want and can contain any character. You can format text to be centered, left-aligned, or right-aligned, and can set the space of the margins. You can also change the font size, color, and style, as well as many other options. These options are discussed later in Customizing Dynamic Textboxes.

Powering Dynamic Textboxes

Dynamic Textboxes require two columns or rows of data from your DataSet. One of these references the category column you will be deriving macros from, and the other references the values column. For example, if you wanted your text to say something like "Sales for [some region] was [some value]," you would drag the column with your region names into the Category field and the column with your values into the Value field. At this point the preview simply pulls in the first category or value from your DataSet, which is probably not what you want. Before the card shows meaningful data, you will need to go into Chart Properties > General > Text and enter the text you want, along with macros referencing data in your selected columns. Chart Properties are discussed later, in Customizing Dynamic Textboxes.    

For information about value, category, and series data, see Understanding Chart Data.

In the Analyzer, you choose the columns containing the data for your Textbox. For more information about choosing data columns, see Applying DataSet Columns to Your Chart.

For more information about formatting charts in the Analyzer, see KPI Card Building Part 2: The Analyzer.

Customizing Dynamic Textboxes

You can customize the appearance of a Dynamic Textbox in a number of ways. Many customizations are possible by setting Chart Properties. Most importantly, in Chart Properties > General > Text, you specify the text that should appear in your textbox, including all macros referencing data from your selected columns. You can also change formatting, margin spacing, font size, color, and style, and more.

For information about all chart properties, see Chart Properties. Unique properties of Dynamic Textboxes include the following. You can click a thumbnail image to see a larger image.

Property

Description

Example

General > Text

Lets you set the text for the Dynamic Textbox. You can insert macros derived from the data in your selected category and/or value columns by clicking the "+" button and selecting the desired macro. For example, if you wanted the text in your textbox to read "Sales for [today's date] are [today's sales value]," you would enter Sales for [First Category] are [First Value].  Then, every time the data updated, the [First Category] and [First Value] macros would update to reflect the most current data.

All of the following macros are available:

Average Value

Returns the average value of all values in your selected value column.

Category Col Name

Returns the name of your selected category column.

Change Percent

Returns the percent of change for all values in your selected value column.

Change Value

Returns the specific amount of change for all values in your selected value column.

First Category

Returns the value for the first category (i.e. topmost category) in your selected category column.

First Value

Returns the first value (i.e. topmost value) in your selected value column.

Item Count

Returns a count of the rows in your data.

Last Category

Returns the value for the last category (i.e. bottommost category) in your selected category column.

Last Value

Returns the last value (i.e. bottommost value) in your selected value column.

Maximum Category

Returns the value for the maximum category in your selected category column. This generally applies to date columns, in which the most recent date will be returned.

Maximum Value

Returns the highest value in your selected value column.

Median Value

Returns the median value in your selected value column.

Minimum Category

Returns the value for the minimum category in your selected category column. This generally applies to date columns, in which the least recent date will be returned.

Minimum Value

Returns the lowest value in your selected value column.

Penultimate Category

Returns the value for the second category in your selected category column. 

Penultimate Value

Returns the second value in your selected value column. 

Value Col Name

Returns the name of your selected value column.

General > Abbreviate Values

When you check this box, values in your Textbox appear abbreviated.

General > Font Size

Lets you select the font size for the text in the Textbox. A number of sizes are available ranging from Small to XX-Large. If you select Default, the size is chosen that best matches the amount of available space. So, if you had the maximum amount of space available, the "XX-Large" size would be used.

General > Font Style

Lets you choose whether the font for your text is plain, bold, italic, or bold-italic.

General > Font Color

Lets you choose the color for your text.

General > Horizontal Text Alignment

Lets you select the horizontal alignment for your text. The examples at right show the same string of text left-aligned, center-aligned, and right-aligned, in that order.

dynamic_textbox_left_aligned.png

dynamic_textbox_centered.png

dynamic_textbox_right_aligned.png

General > Vertical Text Alignment

Determines whether the text in your Textbox appears at the top, in the center, or at the bottom.

General > Top Margin

Determines the amount of space in pixels above the text.

General > Bottom Margin 

Determines the amount of space in pixels below the text. 

General > Left Margin 

Determines the amount of space in pixels to the left of the text. 

General > Right Margin 

Determines the amount of space in pixels to the right of the text. 

Change Value Options > Apply to First Value

Determines whether formatting changes are applied to the first value in the data.

Change Value Options > Apply to Last Value

Determines whether formatting changes are applied to the last value in the data.

Change Value Options > Apply to Minimum Value

Determines whether formatting changes are applied to the minimum value in the data.

Change Value Options > Apply to Maximum Value

Determines whether formatting changes are applied to the maximum value in the data.

Change Value Options > Data

Determines whether formatting changes are applied to the first and last values in the data (default) or the last two values.

Change Value Options > Reverse Color Direction

When this box is checked, any negative values in your data are displayed using the color you select for Positive Color, and vice-versa.

Change Value Options > Positive Color

Determines the color used to represent positive change values/percentages in the textbox.

Change Value Options > Negative Color

Determines the color used to represent negative change values/percentages in the textbox.