Skip to main content

Fill a template

Put values into a text with {name} places, e.g. "Dear {first_name}, invoice {number} is due on {due}." from a Dictionary or a table row.

Command in the String toolkit · id ooa.string/fill_template · 4 inputs (1 required), 2 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
TemplateStringYesText with places in curly brackets, e.g. {name}; {{ and }} write a bracket.
ValuesDictionaryNoThe values by name: a Dictionary or a table row (a Record).
If missingStringNokeepA place without a value: keep {name}, leave it empty, or fail with STRING.MISSING_VALUE.
From agentBooleanNofalseG1 (AA parity): also fill $name$ places with the agent's own variables now, for a text read while the agent runs (from a file or a web page). Credentials are never filled in.

Outputs​

OutputTypeWhat it is
resultStringThe filled text.
missingListPlaces that had no value.