Introducing Matrix.MBS: Dynamic Function Calls with Matrix Parameters

With version 16.2 of the MBS FileMaker Plugin, a powerful new function has been added: Matrix.MBS. This feature opens up a flexible way to dynamically call MBS functions using parameters stored inside a matrix.

If you’ve ever needed to construct parameter lists programmatically or pass variable-length arguments into MBS functions, this addition makes the process significantly cleaner and more scalable.

What Does Matrix.MBS Do?

Matrix.MBS allows you to:

  • Store parameters in a matrix structure

  • Automatically collect values from rows and columns

  • Ignore empty cells

  • Pass those values as arguments to another MBS function

  • Return the result directly

Syntax:

MBS( "Matrix.MBS"; MatrixRef; FunctionName )

Why This Matters

Before this function, dynamically assembling parameter lists could be tedious, especially when dealing with optional values or variable argument counts. Now, you can:

  • Build parameter sets programmatically

  • Reuse matrix structures across different function calls

  • Simplify scripts that rely on dynamic inputs

Example 1: Simple Text Concatenation

A basic example demonstrating how values in a matrix can be passed into a function:

Let([
    m = MBS("Matrix.New"; 3; 1);
    s = MBS("Matrix.SetValue"; m; 0; 0; "Hello");
    s = MBS("Matrix.SetValue"; m; 1; 0; " ");
    s = MBS("Matrix.SetValue"; m; 2; 0; "World");
    r = MBS("Matrix.MBS"; m; "Text.Concat");
    m = MBS("Matrix.Release"; m)
]; r)

Result:

Hello World

Example 2: Skipping Empty Values

Empty cells are automatically ignored, which makes it easy to handle optional parameters:

Let([
    m = MBS("Matrix.New"; 4; 1);
    s = MBS("Matrix.SetValue"; m; 0; 0; "FileMaker");
    // Row 1 left empty
    s = MBS("Matrix.SetValue"; m; 2; 0; " Plugin");
    s = MBS("Matrix.SetValue"; m; 3; 0; " Rocks!");
    r = MBS("Matrix.MBS"; m; "Text.Concat");
    m = MBS("Matrix.Release"; m)
]; r)

Result:

FileMaker Plugin Rocks!

Key Takeaways

  • Matrix.MBS turns a matrix into a flexible argument list

  • Empty cells are safely ignored. If you like to pass empty value, just pass "".

  • Works with any compatible MBS function

  • Great for dynamic scripting and reusable logic

Availability

  • Introduced in MBS FileMaker Plugin 16.2

  • Available across macOS, Windows, Linux, Server, and iOS SDK

This new function is a small addition with big potential. If you’re working with dynamic inputs or building reusable scripting components, Matrix.MBS is definitely worth integrating into your workflow.