Dynamic Text
Learn how to create a dynamic text in Semaphor
This visual allows you to display formatted text dynamically based on query results. You can use HTML tags to style the text.
Values in your own words
To mix your own words with values, use a text card and insert variables: what a reader chose in a filter or control, and values from your data such as an address, a total, a list or a change from the period before. The words can follow the values ("up 6%", "1 order", "No contact on file"), and links can carry them. See Variables; they work the same in text cards and Documents.
How to use
- Write a query that retrieves the data you want to display.
- The first column in the first row is used as the text to display.
This is useful for embedding dynamic content directly from your data source while maintaining full control over its appearance.
SELECT 'I would like to display this text for ' || sub_category as text FROM table
LIMIT 1
You can also include HTML tags within the value to format the text. For example, you might use <strong> for bold text, <em> for italics, or <a> to create hyperlinks.
SELECT '<strong style="color:blue;">Recommendation:</strong>
<br/> The units in the <em>' || sub_category || '</em> sub category might be getting delayed. A quick inspection could prevent any unexpected surprises.' as text
FROM table
LIMIT 1;