Creates a matrix of size (Rows, Columns) with a ConstantValue for each element (each element is followed by a semi-colon).
Average rating: 4.6 (32 votes) Log in to vote
Dr. Ronald W. Satz
5; 5; 5; 5; 5; 5; 5; 5;
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This function is used in preparation for Transpower Corporation's SetCell custom function, also listed here on Brian Dunning's site. Once CreateConstantMatrix is run (which sets up the default values of the elements), SetCell can be run to populate the matrix with the non-default values.
The CreateConstantMatrix should be called with a null value for the matrix name (" ") and with 0 values for the row and column counters.
In the sample input, the matrix is to have 2 rows with 8 columns, all having the value of 5. The SetCell custom function can then set each element to its proper value. Note: The CreateConstantMatrix does NOT add a paragraph return at the end, so it's necessary to delete the "1 + " in the calculation for tot_rows in SetCell!
Update (06/30/2012): fixed bug in creating single column matrix
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.