Brian Dunning's FileMaker Custom Functions

FormatList ( TheList ; Adjust ; LenX )

Format of every element of a given List

  Average rating: 4.2 (42 votes) Log in to vote

Therese Telepski   Therese Telepski
Art + Promotion

Share on Facebook Share on Twitter

  Sample input:
FormatList( "1¶13¶145" ; "r" ; 3 )
  Sample output:

(The underscores are blanks in real output. In HTML here pure blanks are truncated, whereas   or & are shown as is.)

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

Based on 'AddConstantToListValues' by Simon Plint.

Sometimes it may be useful to apply some formatting to every element of a list; e.g. if you want to convert it into a formatted one line text string where every element is represented as an equidistant item. E.g. think of an attendance sheet for a recurring event like sports training etc., where the number of attendants may vary from 5 to 50.

The function adds white spaces to every element of the list, either right or left hand according to parameter 'Adjust', till the total length of that element reaches LenX.

Of course the blank spaces can be replaced by underscores or an arbitrary character given as a fourth parameter if needed and wanted.

The function is called recursively till the whole list is worked down.

To convert it to a single line just add a command like the following after applying the above format:
Substitute ( FormattedList ; "¶" ; Separator )



Lee Smith   Lee Smith
Jun 21, 2010
There is something wrong with your Custom Function.

The edit box doesn't want to accept Bündig =, and breaks there.

Is this a Function that we should have already.
Therese Telepski   Therese Telepski, Suestedt, Germany
Jun 21, 2010
Sorry, of course it has to be 'Adjust', not 'Bündig'.

I created this on a German system and had to translate every function back into English again -- and for sake of comprehensibility I did the same with the variable names, missing the one you mentioned.

Hope everything is straightened out now and working.



Log in to post comments.


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

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 16 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: