# Hexadecimal Formats

This can be used in two ways – one is to assign a fixed length random hexadecimal value to a field, and the other is to transform an assigned field to a hexadecimal value.

The usage is fairly simple.&#x20;

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">EXAMPLE</td><td valign="top">RESULT</td></tr><tr><td valign="top">%HEX|4</td><td valign="top"><p>a random hexadecimal string with the given size:</p><p>"414d"</p></td></tr><tr><td valign="top">%HEX</td><td valign="top"><p>a hexadecimal string from the current value of the attribute:</p><p>eg. with "some" as current value:</p><p>"736f6d65"</p></td></tr></tbody></table>

#### Assign a random hexadecimal value

#### Convert an assigned value to hexadecimal


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.apica.io/platform-docs/test-data-orchestrator-tdo/user-documentation/format-function-guide/hexadecimal-formats.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
