FileMaker Barcode Custom Functions (Font Encoder)
- These custom functions are font encoders that allow barcode fonts to be formatted within text fields.
- Embeds the font encoder as a custom function directly within the database file, no plug-ins or scripts are required.
- Supports the Universal Barcode Font, a single font that generates many barcode types and provides cross-platform compatibility between Windows, Mac, Linux, and mobile devices.
- Creates many barcode types including Code 128, GS1-128, Code 39, ITF, Code 93, MSI, Codabar, UPC & EAN. 2D barcode types are supported in the FileMaker Font Encoder Object.
- Compatible with FileMaker Pro and FileMaker Go versions 12 and
up for Windows, Mac, iPhone, and iPad, 32 and 64 bit. Previous versions of FileMaker,
such as 10, 11, and earlier, should use the
NOTE: The download example is formatted for Universal Barcode Fonts, but includes additional custom functions for individual font packages as well
Custom Function Integration Tutorial
IDAutomation's Font Encoder Functions for FileMaker format the data that needs to be encoded in the barcode to the font, so when the font is applied a correct barcode will be generated. Unlike plugins, custom functions are cross-platform compatible and remain embedded in the database, even when distributed.
If the database is being distributed to multiple devices, the appropriate barcode font must also be installed on each device. IDAutomation also offers the Native Barcode Generator for FileMaker, which allows distribution to multiple devices without the need to distribute fonts.
Download and extract the IDAutomation_FileMakerFontEncoderFunctions file
from the FileMaker Font Encoder Function Download Package. The example is formatted
for the Universal
- Install the desired barcode font. Mac users should use the Universal Barcode Font with the appropriate "Uni" Function to avoid compatibility issues with character sets.
- Open the database that is to generate the barcode and choose File - Manage
- Custom Functions. How to enable Custom Functions?
- Choose Import and then select the
IDAutomation_FileMakerFontEncoderFunctions file that was extracted in Step
- Select all functions in this database by pressing Ctrl-A and the space bar.
It is necessary to select
all of the functions because several of the functions
depend on others to be present.
- Choose File - Manage Database to create a calculated field that will
contain the barcode. Name the field to be the same as the related function name,
without the underscores and click Create. In this example, the field will be
named IDAutomationUniCode128 and it will call the IDAutomation_Uni_Code128
function, which creates Code 128 with the Universal Barcode Font.
- Scroll down the list of functions and double-click on the IDAutomation_Uni_Code128 function to have the function appear in the formula box.
- Replace "DataToEncode" with the field that is to be encoded in the barcode
from the Current Table options. Be sure to delete the parenthesis.
- Select TEXT as the Calculation Result and click OK.
Combining Multiple Fields
Combining multiple fields into a single barcode is easily achieved when
ApplyTilde is enabled. For example, the following would
encode "File" <Return> "Maker" <Tab> "Pro":
IDAutomation_Uni_C128 ("File~013Maker~009Pro" & "|1")
Combining two data fields with a tab between:
IDAutomation_Uni_C128 (Field_1 & "~009" & Field_2 & "|1")
Some of the functions have multiple parameters. When this occurs, use the '|' (pipe) as the dividing character for these additional parameters. If the additional parameters are omitted, defaults will be used.
Universal Barcode Font
NOTE: IDAutomation recommends using the Universal Barcode Font for cross-platform compatibility and when generating Code 128 or ITF barcodes outside of the USA.
|Barcode Type||Functions & Notes||Font to Use|
Standard encoding: IDAutomation_Uni_C128(Field_1)
GS1-128 Encoding: IDAutomation_Uni_C128("~202" & Field_1)
This method returns the human readable text for Code 128 barcodes, such as with GS1-128.
|Additional Code 128 Functions:
Code 39 without the check digit included.
|Codabar||IDAutomation_Uni_Codabar(DataToEncode | N_Dimension | StartChar | StopChar)||IDAutomation_Uni|
|Interleaved 2 of 5||
|MSI Plessey||IDAutomation_Uni_MSI(DataToEncode | N_Dimension | IncludeCheckDigit)||IDAutomation_Uni|
|USPS Postnet||IDAutomation_Uni_Postnet(DataToEncode | IncludeCheckDigit)||IDAutomation_Uni
(XS, S or M size)
|Standard Font Functions|
|Barcode Type||Functions & Notes||Font to Use|
|When using the IDAutomationC128 or IDAutomationI25 fonts on a Mac or outside of the USA, consider using the Universal Barcode Font with the appropriate Universal Function to avoid incompatibilities.|
NOTE: To avoid language and locale incompatibilities when generating Code 128 barcodes on a Mac or outside of the USA, consider using the Universal Barcode Font Package with the IDAutomation_Uni_C128 function.
|Text Interpretation||IDAutomation_Code128HR(DataToEncode)||Text Font|
|Interleaved 2 of 5||IDAutomation_I2of5(DataToEncode)||
|Interleaved 2 of 5||IDAutomation_I2of5Mod10(DataToEncode)||
|* When using the IDAutomationC128 or IDAutomationI25 fonts outside of the USA or on a Mac, consider using the Universal Barcode Font with the appropriate Universal Function to avoid language and locale incompatibilities.|
with check digit
|USPS Postnet & Planet||IDAutomation_Postnet(DataToEncode)||
- DataToEncode: A string value that represents
the data that is being encoded. Within FileMaker, fields may be specified directly
and text should be represented in double quotes. Additional parameters are optional
and are separated with the "|" pipe character.
Standard encoding: IDAutomation_Code128(Field_1)
Encoding GS1-128: IDAutomation_Uni_C128("~212" & GS1_Data_Field & "|1")
- N_Dimension: Determines the width of the
wide bars, which is a multiple of the X dimension. The X dimension is determined
by the font point size. Valid values are 2, 2.5, and 3. The default is 2.
- Example: IDAutomation_Uni_C39(Field_1 & "|3")
- IncludeCheckDigit: If this value
is 1, a check digit will be calculated automatically and included in the barcode,
if appropriate, for the chosen symbology.
Universal Font Example: IDAutomation_Uni_C39(Field_1 & "|3|1")
- Example: IDAutomation_Code39Mod43(Field_1)
- ApplyTilde: In IDAutomation_Uni_C128 and
IDAutomation_C128, if the
ApplyTilde option is set to 0, the tilde will be not evaluated. The default
value is "1" enabled.
- Be sure that the barcode fits in the targeted field. If the printed barcode cannot be accurately read with a barcode scanner, the barcode may be too wide for the field. This can result in truncation of the symbol.
- If numbers appear instead of text for a barcode field, ensure that the TEXT option is selected in the Calculation Result drop-down box as is outlined above.
- Additional problems and solutions are provided at IDAutomation's barcode font technical support site and by searching resolved public FileMaker forum threads. Priority phone, email, and forum support are provided up to 30 days after purchase. Additional support is available as long as the Priority Support and Upgrade Subscription is active.