Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
Matrix.Add
Adds a value to cells in matrix.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| Matrix | 10.2 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| MatrixRef | The matrix reference number. | $matrix | |
| Value | The value to add to all cells. | 123 | |
| firstRow | The index of first row. Default is 0. |
0 | Optional |
| lastRow | The index of last row. Default is FM.SQL.RowCount-1. |
5 | Optional |
| firstCol | The index of first column. Default is 0. |
0 | Optional |
| lastCol | The index of last column. Default is FM.SQL.FieldCount-1. |
6 | Optional |
Result
Returns OK or error.
Description
Adds a value to cells in matrix.We loop over all rows in all columns for the range and add the given value to the numbers.
If the cell doesn't contain a number, it's converted to a number like GetAsNumber().
Examples
Add one to each cell:
Set Variable [ $matrix ; Value: MBS("Matrix.New"; 5; 6) ]
# set values
Set Variable [ $r ; Value: MBS("Matrix.SetRow"; $matrix; 0; "Joe¶Miller¶New York¶123") ]
Set Variable [ $r ; Value: MBS("Matrix.SetRow"; $matrix; 1; "Bob¶Jones¶Washington¶234") ]
Set Variable [ $r ; Value: MBS("Matrix.SetRow"; $matrix; 2; "Jane¶Stones¶Los Angeles¶567") ]
# add one to all
Set Variable [ $r ; Value: MBS("Matrix.Add"; $matrix; 1; 0; 3; 3; 3) ]
# show numbers
Show Custom Dialog [ "Values" ; MBS("Matrix.GetColumn"; $matrix; 3) ]
# free
Set Variable [ $r ; Value: MBS("Matrix.Release"; $matrix) ]
See also
- FM.SQL.Field
- FM.SQL.FieldCount
- FM.SQL.RowCount
- Matrix.AddColumn
- Matrix.AddColumns
- Matrix.AddRow
- Matrix.Avg
- Matrix.New
- Matrix.SetRow
- SQL.FieldCount
Blog Entries
- News about the MBS FileMaker Plugin 10.2
- Neues MBS FileMaker Plugin 10.2
- MBS FileMaker Plugin 10.2 - More than 6200 Functions In One Plugin
- MBS FileMaker Plugin, version 10.2pr2
Release notes
- Version 10.2
- Added Matrix.Add function.
Created 2nd April 2020, last changed 2nd November 2020
Math.TextToNumber - Matrix.AddColumn
Feedback: Report problem or ask question.
Links
MBS Xojo blog