Code - Custom Function
SUMLIST ( list )
BrianDunning.com, Brian Dunning http://www.briandunning.com/filemaker-custom-functions/list.php
Rate this function: Average rating: 5.0 (1 vote) Discuss this Custom FunctionMartin Spanjaard, Trias Digitaal
http://www.triasdigitaal.nl
sums the numbers in a list
==================== SAMPLE INPUT AND OUTPUT ====================
INPUT
SUMLIST ( 2.5¶3 )
OUTPUT
5.5
==================== DESCRIPTION ====================
Adds the numbers in a list. We use it on our invoices, where the user is free to put the amounts in a text field.
It recursively takes the first number off the list and adds it to the rest of the list, till the list is empty.
Formatting is done recursively by two other custom functions.
==================== CUSTOM FUNCTION ====================
// Martin Spanjaard 19-12-2007
// Sums the numbers in a list
// Simplified version of the customfunction "TotalList (theList)" of Geoff Wells.
// Is functioning without a problem for the last three years.
Case (
ValueCount ( list ) > 0
;
GetAsNumber ( ( LeftValues ( list ; 1 ) ) )
+
SUMLIST ( RightValues ( list ; ValueCount( list ) - 1 ) )
)
Referring URL: 'http://www.briandunning.com/cf/1116'
Keywords: ''
ClipManager:

