Reference > Functions reference > Container functions > HexDecode
 

HexDecode

Returns either container or text content from text encoded in hexadecimal format.

Format 

HexDecode ( data {; fileNameWithExtension } )

Parameters 

data - text expression or text field that contains hexadecimal data to decode.

fileNameWithExtension - text expression or text field that contains the filename and extension to use when the returned content is stored in a container field.

Data type returned 

text, container

Originated in 

FileMaker Pro 16.0

Description 

To decode a hexadecimal value and return the result in a text field (or a variable used as text data), for the data parameter, specify text that was in UTF-8 format and then hex encoded.

To decode a hexadecimal value that represents binary data, return the result in a container field (or a variable used as container data) and specify the fileNameWithExtension parameter. If a filename and extension are not specified, this function returns text rather than container data.

Notes 

This function is not supported in runtime solutions and returns "?".

Example 1 

HexDecode ( "46696C654D616B6572" ) returns FileMaker.

Example 2 

Decodes hexadecimal data in a text field and stores it as a file named key.data in a container field.

Set Field [ table::container ; HexDecode ( table::text ; "key.data" ) ]

Related topics 

Functions reference (category list)

Functions reference (alphabetical list)

About formulas

About functions

Defining calculation fields

Using operators in formulas