The Virtual List Technique

Expert

Use the Virtual List pattern to build custom list views, reports, and data displays that go beyond what portals and sub-summary layouts can achieve natively.

What you'll learn

  • How the Virtual List architecture works
  • How to set up the Numbers utility table and relationship
  • How to populate the virtual list via script and display it in a portal
  • Practical use cases: custom reports, search results, command logs

The Virtual List technique (developed by Ray Cologon and popularized in the FM community) uses a portal relationship with a numbers/counter table to display arbitrary lines of content in a portal, where each row shows a computed value from a script-populated list. This enables fully custom report layouts, complex list displays, and content that cannot be expressed as a simple portal or sub-summary.

1/4
1

Virtual List architecture overview

The Virtual List uses a portal connected to a Numbers table (rows 1-N). Each portal row evaluates a GetValue() calculation on a global multi-line text field. The script populates the global with newline-separated values; the portal renders one value per row.

TEXT
// Architecture:
// 1. Numbers table: just one field (n), containing integers 1, 2, 3, ... 10000
// 2. Global field: Globals::VL_Content (text, global storage)
// 3. Relationship: Globals to Numbers via a "less than or equal to" trick:
//    Globals::VL_Count >= Numbers::n
//    (VL_Count = number of lines in VL_Content)
// 4. Portal: based on the Numbers TO
// 5. Calculation field in portal: GetValue ( Globals::VL_Content ; Numbers::n )

// When the script sets VL_Content to a return-separated list of lines
// and VL_Count to the number of lines, the portal shows one line per row

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

Sign in to FM Dojo