Software Venture Consulting
ToMarket

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
Training
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Contact


Privacy Policy



FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.

 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

ListSum( myList )

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 4.1  (9 votes)
  Discuss this Custom Function

Tom Fitch, Fitch & Fitch
http://www.fitchandfitch.com/

Add up a list of numbers

Sample Input:
1
2
3
Sample Output:
6


 Then copy & paste into FileMaker Advanced's Edit Custom Function window.

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed

Description:

This replaces the list's carriage returns with semicolons so that the Sum function can be used, e.g. Sum(1;2;3). Non-recursive. Works with negative numbers.

Inspired by comments on the SUMLIST function.

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

This is my Custom Function and I want to edit it

Discuss:

Hello,

Be carreful with this type of calculation using

Evaluate ( Max or Evaluate ( Min or Evaluate ( Sum (...)

The result will be "?" if you have 1001 values in your list

Agnès, France
May 25, 2011 3:27pm

Thanks, Agnès! You're correct. I wasn't able to locate any documentation of this limitation, and I'd like to know more about it. Can you point me to a reference?

Tom Fitch, Portland, Oregon
May 25, 2011 5:11pm

I have no reference for this, just the tests I did with Evaluate and calculations in FileMaker.
There is no problem, usually we use this calculation on small lists, until the day where. this is what happened to me.

to test :

Let ([

myList = Customlist ( 1 ; nbr ; "[n]" ) ;

it = Substitute( myList ; ¶ ; ";" ) ;
Su = Substitute( myList ; ¶ ; "+" )
];
Evaluate( "Sum(" & it & ")" ) // Limit nbr : 1000
& ¶ &
Evaluate( Su ) // limit nbr : 5238
)
Let ( $Count = 0 ;
Customlist ( 1 ; nbr ; "Let ([ $Count = $Count + [n] ]; """" )" ) & $Count ) // limit nbr : 500000

Agnès, France
May 26, 2011 1:35am

Interesting. Thanks again for the info.

Tom Fitch, Portland, Oregon
May 26, 2011 8:32am

It also doesn't work if you only have one item in the list. You need to do a check and append a "0" to the supplied list if there is only one item.

Bernard Cheang, Singapore
December 29, 2011 11:25pm

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
City/Location:
Comment:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 5 + 3 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. FilteredPortalList ( fieldObjectName ; portalRow )
  (Tue, May 21, 5:33pm)
2. ListToggle ( InList ; InValue )
  (Thu, May 16, 6:59pm)
3. VatFormat ( vat )
  (Tue, May 14, 2:45am)
4. CheckVatBE ( vat )
  (Tue, May 14, 2:32am)
5. CheckIBAN (IBAN )
  (Tue, May 14, 2:24am)
6. OrcidCheckDigit ( Orcid_id ; Result ; Iterations )
  (Wed, May 08, 1:44am)
7. DateRangeBySpan ( Begin ; End ; Term)
  (Mon, May 06, 6:53am)
8. Convert_Arabic_to_Chinese( number )
  (Thu, May 02, 6:10am)

RSS Feed of Custom Functions