Software Venture Consulting

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

Free Web Tools
Free FileMaker Tools

Personal Pages

Shopping Cart
Shopping Cart


Free Newsletter


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

cfCode128 ( pString; pCodeSet )

Rate this function:  

  Average rating: 4.3  (52 votes)
  Discuss this Custom Function

Tammo Fornalik / Felix Hausberner, dbyte solutions

composes the final barcode Code128 of symbology A,B or C from a given alphanumeric string.

Sample Input:
cfCode128 ( "SBM16672_2008_08_25"; "B" )
Sample Output:
"SBM16672_2008_08_25" as Code128B including checksum and start/stop tags (viewable with IDAutomation Code128 fonts)

 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


composes the final barcode Code128 of symbology A,B or C from a given alphanumeric string.
includes the checksum of the string (modulo 103) as well as start/stop characters.
this CF is meant to be used with barcode font "IDAutomationC128..."

automatic switching between variants A, B, C within a single barcode is not yet supported.

pString: string to be used as a barcode.
pCodeSet: "A" or "B" or "C" are expected.

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

This is my Custom Function and I want to edit it


5 most recent comments | Show all 9 comments

Hey Didier,

thanks for your comment! Meanwhile, I'm on 4D (great, smart, faster, obsolete, grey-haired old fashioned ones have fun with it, just as me) but it's always nice to read some FRESH comments!


Tammo, Outlaw
December 12, 2013 2:07pm

If anyone is concerned with the licensing of the ID Automation fonts I can confirm that this encoding works just fine with the font available here:

Many thanks for this CF, I wasn't looking forward to hacking one together myself.

January 16, 2014 9:32am

Hi, I am using the IDAutomation Code128 plugin in our filemaker database (FM11 pro) Windows 8 SP1 {4digit code} and it seemed to work all fine over the last year or two. I am doing stocktake today and the following 4 digit numbers print as a "?"


All other 4 digit numbers (from 0001 - 9999) print fine. I havent changed anything (same font same layout same character size) Label machine is DYMO labelwriter 450, but this id not the culprit as it shows already up as a "?" in Filmaker.

Any idea, pointing in a directionor other help is much apprechiated.
I am really confused about it.


Harald Klette, Geraldton Western Australia
June 28, 2014 2:28am

Getting mixed results using the free Code 128 True Type font.
This great function get it almost always right (as in 1977.2), failing in some 1% of times (as in 1977.3 or in 2002.37), stamping a big "Â" just before the stop bars.

Any ideas?


Rafael Santana, Caracas, Venezuela
September 15, 2014 4:50pm

i have the same problem. with pcodeset "A" the number 20538 result in "Â"..


Rico Meier, Zürich
February 01, 2016 7:25am

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

Your Name:
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 7 + 7 =
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. PreviousMonthEndDate ( myDate )
  (Wed, Mar 07, 3:35am)
2. PreviousMonthName (myDate)
  (Wed, Mar 07, 3:33am)
3. FmTableFields ( tableName ; fieldsInclude ; fieldsExclude ; classExclude ; typeExclude ; prefixExclude )
  (Fri, Mar 02, 6:32am)
4. sql.getTable ( fullyQualifiedFieldObject )
  (Thu, Feb 22, 8:36am)
5. sql.getField ( fullyQualifiedFieldObject )
  (Thu, Feb 22, 8:34am)
6. FilterOut ( ListA ; ListB )
  (Wed, Feb 21, 6:11pm)
7. Char0 ( )
  (Sun, Feb 18, 2:35am)
8. CreateVCardFile ( FirstName ; LastName ; CompanyName ; Phone ; Email ; WEB ; hAddress1 ; hAddress2 ; hZip ; hCity ; hCountry ; wAddress1 ; wAddress2 ; wZip ; wCity%2
  (Sun, Feb 18, 1:50am)

RSS Feed of Custom Functions