List() function advanced patterns

Beginner

Use List() beyond basic concatenation to build conditional value lists, deduplicate related values, and construct multi-line display strings from related records.

What you'll learn

  • How List() filters empty values and why that matters
  • How to build a conditional list by combining List() with If()
  • How to use List() across a relationship to collect related field values
  • How List() differs from a Summary field of type "List of"

List() collects values from a field across related records (or across all records in a found set) and returns them as a return-delimited string, automatically omitting empty values. This automatic empty-value filtering is what makes List() distinctly more useful than naive concatenation for building value collections from related data.

1/4
1

List() basics and empty-value filtering

List() accepts multiple arguments (or a repeating field) and returns a return-delimited string containing only non-empty values. Unlike simple concatenation with |, List() never produces leading, trailing, or double paragraph marks.

FileMaker Script
// Naive concatenation -- broken when optional fields are empty:
FirstName & "|" & MiddleName & "|" & LastName
// -> "John||Smith"  (double | when MiddleName is empty)

// List() -- always clean output:
List ( FirstName ; MiddleName ; LastName )
// -> "John|Smith"  (MiddleName omitted because it is empty)

Sign in to track your progress and pick up where you left off.

Sign in to FM Dojo