Generate full tables and lists with a few keystrokes

Hey Text Blaze community :fire:

It's week 10 of the Text Blaze Feature of the Week series where I post weekly about cool features to showcase all the awesome stuff you can do with Text Blaze :sunglasses:

Generate full tables and lists with a few keystrokes

If you have data that you often reference in your emails, it can be annoying to have to copy it over and over each time you want to reference it.

Creating a table or list with your data takes time, especially if you have lots of items to include.

Using Text Blaze's repeat command, you can quickly generate tables and lists using your data in seconds.

generate-table

Three things to know about the repeat command:

  1. Repeat allows you to repeat a command X number of times, but it also allows you to repeat for every item in a list.

  2. The repeat command is most useful when used with lists in addition to other Text Blaze features.

  3. If you're using the repeat command with a list, you must be intentional with the way you write the command to format the list properly. See the example below.

Note: Repeat works best with Data Blaze data. Data Blaze is a tool that helps you organize your data and access it from anywhere using Text Blaze snippets.

How to create tables and lists in your dashboard

Create lists with repeat and item keys

Here are the steps to create a list using repeat:

  1. Add a dbselect command to your snippet.
  2. Give it a name.
  3. Click the three dots next to the name.
  4. Click "insert repeat"
  5. Change the item keys to display the data you want by scrolling to "Forms" on the right side of the dashboard and clicking the three dots next to "item"
  6. Format your item keys and adjust your repeat command to format your list as needed.

This GIF shows how you can quickly use the repeat command to generate lists along with specific keys for items from Data Blaze data.

create-list-with-repeat

Create tables with repeat

  1. Add a dbselect command to your snippet.
  2. Give it a name.
  3. Click the three dots next to the name.
  4. Click "insert table"
  5. Adjust the columns, rows, headers, item keys, and size of the table as needed.

This GIF shows how you can quickly create a table with the repeat command from Data Blaze data.

create-table

Basic Example

This example shows how you can use repeat to format a list of items.

{products=["Desk Chair", "Office desk", "Rug", "L-shaped desk", "Folding table", "Bookshelf", "White board", "Couch"]}{=products}

{repeat: for item in products} {=item}{endrepeat}

{repeat: for item in products}
{=item}{endrepeat}

To illustrate the power of the repeat command, I've created the bundle below that shows how you can use the repeat command to quickly generate tables and lists from Data Blaze data.

Generate table of available items

generate-table

The first snippet in the bundle above uses the repeat command to quickly generate a table of products from a Data Blaze table.

Items by availability

generate-list

The second snippet in the bundle above uses the repeat command to generate a list of products (separated by availability) that includes price and an emoji to show whether it is available or not.

6 Likes