GetValue() and ValueCount() patterns

Beginner

Use GetValue() and ValueCount() to iterate, slice, and process return-delimited value lists inside calculations.

What you'll learn

  • How GetValue() and ValueCount() address list items
  • How to safely access the last item in a list
  • How to slice a list using GetValue() and While()
  • How to build a new list by transforming each item

Return-delimited value lists are FileMaker's most common in-memory data structure. GetValue(list; n) extracts the nth item, and ValueCount(list) tells you how many items the list contains. Together they are the foundation for every list-processing calculation -- from simple indexing to full iteration with While().

1/4
1

Basic GetValue() and ValueCount()

GetValue(list; n) returns the nth item from a return-delimited list (1-based). ValueCount(list) returns the total number of non-empty items.

FileMaker Script
Let ( list = "Alpha|Beta|Gamma|Delta" ;
  GetValue ( list ; 1 )  // -> "Alpha"
  GetValue ( list ; 3 )  // -> "Gamma"
  ValueCount ( list )    // -> 4
)

// Safely get the last item:
GetValue ( list ; ValueCount ( list ) )  // -> "Delta"

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

Sign in to FM Dojo