flow_text()

Flatten a value into a readable string for use inside text (an email body, a comment, a log line). Multi-value fields are arrays — concatenating one raw would render Array; this joins them sensibly instead.

Syntax

flow_text(value)

Parameters

Name Type Required Description
value any yes A scalar, a single {id,title}/user object, or a list of them.

Returns

A string:

  • list of scalars (multi-select / multi-user emails) → "a, b"
  • list of {id,title} (multi-lookup) → "Title A, Title B"
  • single {id,title} (single lookup) → "Title A"
  • scalar / null → the string as-is

Example

$tags = flow_text($record["tags"]);   // "urgent, billing"
record_comment("tickets", $record["_meta"]["id"], "Tags: " . $tags);

Example output

"urgent, billing"

Notes

  • The visual builder applies this automatically when you embed a multi-value token inside a text string. Use it explicitly in code mode when concatenating a multi-value field.
  • To test membership instead of flattening, use field_contains().

See also: field_contains()