Formula - Field
Section titled “ Formula - Field”The field Formula function returns the value of a named field of the Log Event, such as MessageGUID or EventId.

Animated walkthrough: with the Field Values of the logged Order Received event of order ORD-10005 in the Order-to-Cash demo, field('ApplicationInterchangeId') returns PIC-20261115-1838-0005, and field('MessageGUID') returns the id of the event's body part.
Syntax
Section titled “ Syntax”field('fieldName')Parameters
Section titled “Parameters”| Parameter | Required | Description |
|---|---|---|
'fieldName' |
Yes | The name of the Log Event field, in single quotes, written exactly as in the table below (case-sensitive). |
Supported Field Names
Section titled “Supported Field Names”These are the fields the Field Values tab of the test bench shows (see Test Your Expression). They come from the details part of the Log Event; see JSON Log Event - Details for how each one is set when you log.
| Name | Description |
|---|---|
| ApplicationInterchangeId | Id for the application scope |
| EndPointDirection | The Endpoint Direction |
| EventDirection | The Event Direction |
| EventId | Id of the event (GUID) |
| LocalInterchangeId | Id for the local scope |
| LogDateTime | The originating date and time of the Log Event |
| MessageGUID | Id of the main body part (GUID) |
| OriginalMessageTypeName | The name of the Message Type |
| TotalSize | Size in bytes |
Returns
Section titled “Returns”The value of the named field as text, one value per Log Event.
Examples
Section titled “ Examples”Example 1: Read the MessageGUID
Section titled “Example 1: Read the MessageGUID”| Key | Value |
|---|---|
| EventId | 77dcae21-8c28-ed11-8b59-00155d00b90d |
| LogDateTime | 2022-08-30T19:47:09.3663111+02:00 |
| MessageGUID | ca8e3ab5-7359-4726-a9ca-1f594a4190a1 |
Formula
Section titled “Formula”field('MessageGUID')Result
Section titled “Result”ca8e3ab5-7359-4726-a9ca-1f594a4190a1
The value of the MessageGUID row in the Field Values tab is returned as the single match. The screenshot is the Search Field editor's Test Expression tab; the Search Field Wizard Test step has the same tabs.
Example 2: Read the EventId
Section titled “Example 2: Read the EventId”The Field Values of the same Log Event:

The Field Values tab lists every field name you can pass to field, with the values of the test Log Event.
Formula
Section titled “Formula”field('EventId')Result
Section titled “Result”77dcae21-8c28-ed11-8b59-00155d00b90dfieldreads the fixed Log Event fields only. Use context for Message Context properties and body for the payload.- Nest
fieldin other functions like any other content, for examplesubstring(0, 10, field('LogDateTime'))to keep the date part.