
Here I use a simple recursive custom function to insert as many BOMs in front of StatusName as determined by the value in SortOrder. Then create a calculation field with the following formula: _PrependWithByteOrderMarks ( StatusName SortOrder ) In OrderStatus, create a numeric SortOrder field, and in each record enter a number representing the order in which the corresponding Status is to be displayed in the value list, as shown below. So here is what you can do broken down step by step: imagine we have 2 tables, Order and OrderStatus, and in a layout based on Order, we want to display the values in OrderStatus in a custom order. However, we can bypass this limitation by using char(65279). When we have a dynamic value list composed of 2 fields (say an internal ID and its corresponding user-facing value), and we want to store the values in the first field but only want to display the values in the second field, FileMaker Pro only gives us the option to sort the value list by the values in the second field, which I believe is rather limiting. Lets now look at an interesting use for BOMs. In this post I will refer to byte-order marks as BOMs. This is essentially a null character which is invisible when included in a string. These characters can be generated anywhere the FileMaker Pro calculation engine is available, and because they are just characters, they can be formatted using the formatting tools available in FileMaker Pro, including conditional formatting and the text formatting calculation functions.Īn especially noteworthy character that can be generated using this function is the zero-width non-breaking space character, or byte-order mark, whose Unicode decimal representation is 65279. Char(9664) and Char(9654), respectively, return a left-pointing triangle ◀ and a right-pointing triangle ▶. For example, Char(10003) will return a checkmark ✓.

So it allows developers to easily and natively represent any characters in the Unicode character set in our FileMaker calculations.

This function takes a single numeric parameter representing a Unicode decimal point.


The FileMaker char() function, introduced in FileMaker Pro 10, is a rarely used tool that not only can make certain tasks easier but can also help developers extend the out-of-the-box capabilities of FileMaker Pro.
