Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples
New in version: 9.0   9.1   9.2   9.3   9.4   9.5   10.0   10.1   10.2   10.3    Statistic  


Creates a new matrix (2D array).

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Matrix 9.2 Yes Yes Yes Yes Yes
MBS( "Matrix.New"; Height; Width )   More


Parameter Description Example value
Height The height of the matrix. 3
Width The width of the matrix. 4


Returns matrix reference number or error.


Creates a new matrix (2D array).
Please call Matrix.Free later to free the matrix object.

Internally we store all data in FileMaker data types, so times, dates, timestamps, numbers and containers are preserved as they are and not converted to texts.


Creates a matrix:

Set Variable [ $matrix ; Value: MBS( "Matrix.New"; 3; 4 ) ]
Show Custom Dialog [ "Size" ; MBS( "Matrix.Width"; $matrix ) & " x " & MBS( "Matrix.Height"; $matrix ) ]
Set Variable [ $r ; Value: MBS( "Matrix.Free"; $matrix ) ]

Create and set columns:

Set Variable [ $matrix; Value: MBS("Matrix.New";3;3) ]
# Set the values of the matrix
Set Variable [ $r; Value: MBS( "Matrix.SetColumn"; $matrix; 0;"15¶07¶92" ) ]
Set Variable [ $r; Value: MBS( "Matrix.SetColumn"; $matrix; 1;"17¶3¶60" ) ]
Set Variable [ $r; Value: MBS( "Matrix.SetColumn"; $matrix; 2;"15¶1¶87" ) ]

See also

Blog Entries

FileMaker Magazin

Created 8th April 2019, last changed 17th December 2019

Matrix.Multiply   -   Matrix.NewWithSQL

Feedback: Report problem or ask question.

MBS FileMaker Plugins