Brian Dunning's FileMaker Custom Functions

CombineLists ( Start ; End ; ListFieldsObjects ; Separator ; Function )

concatenate n FieldsLists or ObjectsList

  Average rating: 4.3 (34 votes) Log in to vote

Agnes Barouh   Agnes Barouh - Show more from this author
Tic Tac
http://www.tictac.fr/CoinFileMaker/Page.html

Share on Facebook Share on Twitter

  Sample input:
CombineList ( 1; 10; "TableLiee::FieldA¶TableLiee::FieldB¶TableLiee::FieldC"; " | "; "GetNthRecord" )

-------------------

CombineList ( 1; 10; "ObjectA¶ObjectB¶ObjectC"; "#"; "GetLayoutObjectAttribute" )
[objects in portal]
  Sample output:
| Value1_FieldA | Value1_FieldB | Value1_FieldC |
| Value2_FieldA | Value2_FieldB | Value2_FieldC |
[...]
| Value10_FieldA | Value10_FieldB | Value10_FieldC |

-------------------

#Value1_ObjectA#Value1_ObjectB#Value1_ObjectC#
#Value2_ObjectA#Value2_ObjectB#Value2_ObjectC#
[...]
#Value10_ObjectA#Value10_ObjectB#Value10_ObjectC#

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

Not recursive Function

Carreful : Limited => ListFieldsObjects < 18700 values

* CombineLists () requires CustomList ( start ; End ; Function )
http://www.briandunning.com/cf/868
CustomList Return Error if is empty or not is correct ListFieldsObjects or Function

-> ListFieldsObjects : Fields or Objects with ¶ separator :
"FieldOrObjectA¶FieldOrObjectB¶FieldOrObjectC¶
-> Separator : choose a text separator, space, or tag :
"|" or " | " or "#" or " " to extract or to present the data
-> Function : Function name with "" :
"GetLayoutObjectAttribute" or "GetValue" or " GetNthRecord" or "GetRepetition"; and other "Left" or "Right" (but not Middle() )

----------------------------------------- more examples

CombineLists ( 1; Count ( TableA::ID) ;
"TableA::Products¶TableA::Color¶TableA::Price¶TableA::Qty¶; " | "; "GetNthRecord" )

Result :
| Chair | black | 10$ | 37 |
| Chair | Red | 12$ | 22 |
| armchair | yellow | 35$ | 12 |
| armchair | blue | 15$ | 18 |

CombineLists ( 1; Count ( TableA::ID) ;
"ObjectA¶ObjectB¶ObjectC¶ObjectD¶; " - "; "GetLayoutObjectAttribute" )

Result :
- Chair - black - 10$ - 37 -
- Chair - Red - 12$ - 22 -
- armchair - yellow - 35$ - 12 -
- armchair - blue - 15$ - 18 -

 

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.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 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:

Under construction. Email me your wish list for improvements.