Code
Purpose 
Returns the Unicode code points for the characters in the text.
Format 
Code(text)
Parameters 
text - one or more characters
Data type returned 
number
Originated in 
FileMaker Pro 10.0
Description 
Returns the Unicode code points for the characters in the text. If zero characters are in the text, returns 0.
If one character is in the text, the function returns the code point for that character. If the text contains multiple characters, the Unicode code point for each character is returned as a group of five digits where the code point for the first character is represented by the low five digits, the code point for the second character in the next higher (to the left) five digits, and so forth.
When converting a composite character such as ä, the function returns the Unicode code point for the composite character.
The following table shows how navigational characters are reported to a script activated by this trigger:
 
  8
  9
  9
 10
 13
 27
 28
 29
 30
 31
 32
Note  If there are too many characters to be represented in the FileMaker number field type, the function returns a NaN (Not a Number) value.
Examples 
Code(“”) returns 0.
Code(“a”) returns 97.
Code(“b”) returns 98.
Code(“ab”) returns 9800097.
Code(“ä”) returns 228.
Code(“ä”)(an a followed by a dieresis character entered in a separate keystroke) returns 77600097.
Related topics 
Functions reference (category list)
Functions reference (alphabetical list)
About formulas
About functions
Defining calculation fields
Using operators in formulas