Brian Dunning's FileMaker Custom Functions

Array.SetCell ( array ; columnName ; rowName ; delimiter ; value )

Set a cell within a text array - useful for creating sparse CSV data for virtual list export.

  Average rating: 4.6 (26 votes) Log in to vote

Richard Dyce   Richard Dyce
Dyce & Sons LTD.
http://dyce.com

Share on Facebook Share on Twitter

  Sample input:
Array.SetCell ( ".A.B.C.D¶1.0.0.0.0¶2.0.0.0.0¶3.0.0.0.0" ; "B" ; "2" ; "." ; "X" )
  Sample output:
".A.B.C.D¶1.0.0.0.0¶2.0.X.0.0¶3.0.0.0.0"

i.e.

.A.B.C.D
1.0.0.0.0
2.0.X.0.0
3.0.0.0.0

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

The function allows you to add to an existing array, created with say Array.Create(). Because you can change the delimiter it makes export sparse CSV data easier; create an empty array; fetch the data from an SQL query that returns a list of colName,rowName,value tuples; iterate over the list using Array.SetCell to fill in the blanks in the empty array.

Edited to make parameter order match other functions.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.