Skip to main content

Text

Lido provides STRINGTEMPLATE for building text strings from table column values using a template pattern.


STRINGTEMPLATE

Replaces column reference placeholders in a template string with values from the current table row. This is a non-action formula designed to be used inside a COMPUTEDCOLUMN or in a cell adjacent to a table.

Syntax:

=STRINGTEMPLATE(template)
=STRINGTEMPLATE(template, table_name)

Parameters:

ParameterDescriptionRequired
templateA string containing [@ColumnName] placeholdersYes
table_nameName of the table to resolve columns from (auto-detected if used inside a COMPUTEDCOLUMN)No

Example:

Given a table "Contacts" with columns "First Name", "Last Name", and "Email":

=STRINGTEMPLATE("Hello [@First Name] [@Last Name], your email is [@Email].")

For a row where First Name is "Alice", Last Name is "Smith", and Email is "alice@example.com":

"Hello Alice Smith, your email is alice@example.com."

Usage with COMPUTEDCOLUMN

STRINGTEMPLATE is typically used inside a COMPUTEDCOLUMN, where the table context is automatically available:

=COMPUTEDCOLUMN(STRINGTEMPLATE("Dear [@Name], your order #[@OrderID] is ready."), "Orders", "Notification")

Tips

  • Column name matching is case-sensitive and must match the table header exactly
  • If a referenced column doesn't exist, STRINGTEMPLATE throws an error listing valid column names
  • The template argument can be a cell reference, so you can edit the template text separately from the formula