---
title: How to Use the Search Field Wizard | Quick Search Field Setup from Log Views | Nodinite
description: "Use the Search Field Wizard to create or extend a Search Field straight from a logged message: pick the operation, name the field, test the expression on the real message in the right encoding, save, and re-index."
---

# How to use the Search Field Wizard

The **Search Field Wizard** creates or extends a [Search Field][Search Fields] straight from a logged message. You start from a real [Log Event][], so the wizard already knows its [Message Type][Message Types] and uses its body and context as test data. Six steps take you from "I need to search on this value" to a saved, re-indexed Search Field.

* ✅ Start from the message you're looking at in a [Log View][Log Views]  
* ✅ Test the expression on that real message before you save  
* ✅ Read the sample in the right encoding, preset from the Log Event, [Endpoint][Endpoints], or Message Type  
* ✅ Re-index so messages already logged get the value too  

![Create the Search Field Contoso: Order Currency from an order message with the Search Field Wizard, a Text field with JSON Path $.currency that finds USD, animated walkthrough (7.13)][wizard-create]  
*Animated walkthrough: from the order a customer sent to a saved Search Field, ready to re-index. The steps are below.*  

> **:fa-lightbulb: Wizard or editor?** Use the wizard when you find a value you need to search on while analyzing logs. Use [Add or manage Search Field][] for setup across many Message Types, for Global expressions, and for [Search Field Links][].

---

## :fa-brain-circuit: Understanding the Search Field Wizard

The wizard always works on **one Message Type**: the Message Type of the Log Event you start from, shown at the top of the wizard. What you add or change is a [Search Field Expression][Search Field Expressions] for that Message Type.

```mermaid
graph TD
    A["Select event<br/>the sample Log Event"] --> B["Select Operation<br/>edit, add to, or new"]
    B --> C["Search Field Details or Select Expression<br/>name and data type"]
    C --> D["Test<br/>expression and encoding"]
    D --> E{"Expected<br/>result?"}
    E -->|No| D
    E -->|Yes| F["Summary<br/>save"]
    F --> G["Reindex<br/>apply to logged events"]
    style A fill:#2678BD,color:#fff
    style B fill:#2678BD,color:#fff
    style C fill:#2678BD,color:#fff
    style D fill:#FFD525,color:#000
    style E fill:#FFD525,color:#000
    style F fill:#93d16d,color:#000
    style G fill:#93d16d,color:#000
```

*Diagram: the six wizard steps. Blue steps choose what to change, yellow steps are the test loop, and green steps save and apply the Search Field.*

### :fa-code-compare: Wizard vs the Search Field Editor

|Feature|:fa-wand-magic-sparkles: Search Field Wizard|:fa-gear: Search Field editor|  
|---|---|---|  
|**Start from**|A [Log Event][]: **View message body** or the event's details|[Search Fields Overview][] in [Administration][]|  
|**Message Types**|The [Log Event][]'s [Message Type][Message Types]|Any selection, or Global|  
|**Test data**|The [Log Event][]'s body, context, and fields|A [Log Event][] you pick|  
|[Search Field Links][]|❌ Not available|✅ Configure in the editor|  
|**Re-index**|Last wizard step|**Reindex Search Field** after saving; see [How a Re-Index Runs][Add or manage Search Field - How a Re-Index Runs]|  

### Prerequisites

* Access to a [Log View][Log Views] that shows the messages you want to extract values from  
* The built-in **Administrator** role: the wizard and its buttons are shown to Administrators only (see [Roles and Permissions][])  
* A [Log Event][] with a message body or context to use as sample data. A Log Event without one works too: you paste a sample body on the **Test** step (see [A Log Event without a message body](#a-log-event-without-a-message-body))  

---

## :fa-list-ol: Step 1: Select Event

1. Open a [Log View][Log Views] in the [Web Client][] and search for the messages you want to extract data from.
2. Open [View message body][] on one of the [Log Events][Log Event].
3. Click the **Search Field Wizard** button.

![Search Field Wizard button (7.11)][wizard-button]  
*The **Search Field Wizard** button, available when you view a message body.*  

:new7.12: A Log Event with more than one body opens the wizard on the body you viewed: from **View message body #2**, the wizard tests body 2. **Diff message body**, which shows two bodies side by side from **With Selected**, has no **Search Field Wizard** button, because it isn't one Log Event.

Administrators can also open the wizard from the [Log Event details][View details]: click **Advanced**, then **Search Field Wizard**.

You can also open the wizard from **Administration** > **Search Fields** > edit a Search Field > **Wizard**. Then use the **Select event** step to pick the Log Event whose message the wizard uses as sample data.

---

## :fa-pen: Step 2: Select Operation

Choose what to do for the Message Type shown at the top of the wizard, then click **Next**.

![Select Operation step for O2C.Order.Received/1.0 with New Search Field selected and Edit existing Search Field for this Message Type showing 7 existing (7.13)][wizard-modal]  
*The **Select Operation** step for the `O2C.Order.Received/1.0` Message Type, with **New Search Field** selected.*  

| Operation | Use it when |
| --- | --- |
| **Edit existing Search Field for this Message Type** | A Search Field already has an expression for this Message Type and you want to change it. The counter shows how many exist. |
| **Add to existing Search Field** | The Search Field exists, for example "Order Number", but has no expression for this Message Type yet. You add one. |
| **New Search Field** | No suitable Search Field exists. You create one. |

---

## :fa-tag: Step 3: Search Field Details or Select Expression {#fa-tag-step-3-select-expression}

The step is called **Search Field Details** for a **New Search Field**, and **Select Expression** when you edit or add to an existing one.

For a **New Search Field**:

1. Enter a unique, business-friendly **Name**, such as "Order Number" or "Customer ID". Users search with this name.
2. Select the **Data Type** that matches the values: Text, Integer, Long Integer, Real number with 2 decimals, GUID, Double, Date time with offset, or Bitwise Integer. See [Data Type Options][Add or manage Search Field - Data Type Options].
3. Optionally add a **Description**.

For **Edit** or **Add to**, select the existing Search Field; the wizard loads its configuration.

> ⚠️ **Choose the Data Type carefully.** "Text" for numbers prevents range queries (>, <), and "Integer" for GUIDs causes extraction failures. Changing the Data Type after the Search Field is used in Log Views may cause errors when those Log Views load.

---

## :fa-flask: Step 4: Test the Expression

On the **Test** step, write the expression and test it against the message you started from.

![Test step of the New Search Field Contoso: Order Currency with the JSON Path $.currency and one unique match, USD (7.13)][test-expression]  
*Testing the [JSON Path][] expression `$.currency` against an order: the **Result** shows one unique match, `USD`.*  

1. Select the plugin in **Type**. Not sure which one? See [Choose a plugin][].
2. Enter the **Expression**.
3. Check the result. When the wizard can suggest expressions, it lists them under **Resolvable Expressions**, each with a **Test** button.
4. Check the **Result**: the **Number of unique matches** and each extracted value, or an error.
5. Adjust and test again until the result is what users should search for, then click **Next**.

The plugin's own checkboxes, such as **Treat sub XML as a string** and **Global** for [XPath with RegEx][], tick on the **Test** step as well:

![Search Field Wizard Test step with Type XPath with RegEx and Treat sub XML as a string and Global ticked (7.13)][wizard-test-ticked]  
*The plugin's checkboxes on the wizard's **Test** step.*  

The sample is shown on the **Message Body**, **Message Context**, and **Field Values** tabs, so you can see what a body or context expression reads.

### Choose the Encoding of the Sample Message

The **Encoding** dropdown below the message body tells the wizard how to read the sample. :new7.11: It starts on the message's resolved encoding: the `ExtendedProperties/1.0#Encoding` context property, else an encoding named in the XML declaration of the body, else the [Endpoint][Endpoints] **Character encoding**, else the [Message Type][Message Types] **Character encoding**. The [Logging Service][] uses the same encoding to extract values, so your test result matches what gets indexed.

If characters such as `Å` or `é` show as garbage, pick another encoding and click **Reload message body**. If another encoding fixes it, update the encoding on the Message Type or the Endpoint, as described in [Character Encoding][].

![Encoding dropdown and Reload message body button on the Test step (7.12)][wizard-encoding]  
*The **Encoding** dropdown on the **Test** step, preset to **UTF-8 (without BOM)** from the Message Type. Click **Reload message body** after you change it.*  

### A Log Event without a Message Body

:new7.12: A [Log Event][] can be logged without a message body or context. The wizard then opens the **Test** step with an empty **Message Body** and the note *This Log Event was logged without a message body or context. Type or paste a body above to test the expression, or test it on the Field Values.* Paste a sample message to test a body expression, or test on the **Field Values** tab.

![Search Field Wizard Test step with an empty Message Body and the note that the Log Event was logged without a message body or context (7.13)][wizard-no-body]  
*The **Test** step for a Log Event logged without a body: paste a sample, or switch to **Field Values**.*  

For such an event, **View message body** in the Log View's **Action** menu is disabled, so open the wizard from the Log Event details (**Advanced** > **Search Field Wizard**). No body is requested from the server.

![An AS/400 address export opens the wizard on ISO-8859-1, its Message Type encoding, a web shop note on its own UTF-8, and for an event logged without a body View message body is disabled and the Test step opens empty with the no-body note, animated walkthrough (7.13)][wizard-no-body-walk]  
*Animated walkthrough: each event opens on its own encoding, and an event without a body loads none.*  

When the body exists but can't be read, the wizard shows *Could not load the message body* with the reason. *The message body was not found (404). It has probably been removed by the retention settings of its Message Type (days to keep message bodies).* means the body is gone, removed from the [Log Databases][] by the retention settings of its [Message Type][Message Types]. Pick another Log Event, or paste a sample.

### Example: An Order Number from XML

#### Input

```xml
<Order>
  <OrderID>ORD-2024-12345</OrderID>
  <Customer>Contoso Corp</Customer>
</Order>
```

#### Expression

* **Type:** [XPath][]
* **Expression:** `/Order/OrderID`

#### Result

```text
ORD-2024-12345
```

### Example: A Customer ID from JSON

#### Input

```json
{ "order": { "orderId": "ORD-2024-12345", "customerId": "CUST-789" } }
```

#### Expression

* **Type:** [JSON Path][]
* **Expression:** `$.order.customerId`

#### Result

```text
CUST-789
```

### Example: A Booking Number from Plain Text

#### Input

```text
Shipment confirmed. Booking: TRN-2024-67890. Carrier: FedEx.
```

#### Expression

* **Type:** [RegEx][]
* **Expression:** `TRN-\d{4}-\d+`

#### Result

```text
TRN-2024-67890
```

[RegEx][] returns the whole match. To return only part of a match, such as the value after `Booking:`, use [RegEx with capturing groups][].

---

## :fa-floppy-disk: Step 5: Summary

Review the Search Field and its expression for the Message Type, and save. From now on, the [Logging Service][] extracts the value from new [Log Events][Log Event] of this Message Type.

The wizard doesn't add the field to any [Log View][Log Views]: add it yourself on the Log View's **Search criteria** tab, in the **Default search setup** or the **Optional fields**, or as a column on the **Display result** tab. A Log View only shows the values of the Search Fields it includes; see [Which Search Field Values a Log View Shows][] and [HideSearchFieldValuesInLogViews][]. An Optional field gets a column in the result list (with **Display result** on **Default**) and shows its values from the first search; users may also add it to their search.

---

## :fa-arrows-rotate: Step 6: Reindex

Log Events logged before you saved don't have the value yet. Use the **Reindex** step to apply the Search Field to them.

![Reindex the order events for Contoso: Order Total, then search order ORD-10001 in the Log View Contoso: Orders and see the Order Total column, animated walkthrough (7.12)][wizard-reindex]  
*Animated walkthrough: the re-index fills the value on events logged before the save, and the Log View's Optional field shows it.*  

1. The last step lists the Message Types whose logged events get the value, here *O2C.Order.Received/1.0*, ticked. Click **Reindex**.
2. **Reindex operation started** says how many events will be reprocessed for the selected Message Type. When a [Log Database][Log Databases] is read-only, it adds *Read-only Log Databases were not reindexed:* with their names; clear the Read-only setting of a Log Database to include its events. The re-index runs in the background. Click **Close**.
3. In the Log View *Contoso: Orders*, *Contoso: Order Total* is an Optional field. The wizard doesn't add the field for you; see Step 5.
4. Type *ORD-10001* in **O2C - Order ID** and click **Search**. The **Contoso: Order Total** column shows *99.95* on the order the customer sent. The other events show N/A, because their Message Types carry no order total.

:new7.10.11: The wizard waits for the save to finish before it starts the re-index, so the re-index always uses the saved Search Field. A re-index runs in batches, does not block logging, and can be run again if it stops. When it finishes, the result is written to the [Log Audits][]. See '[How a Re-Index Runs][Add or manage Search Field - How a Re-Index Runs]'.

>[!TIP]
>Re-indexing uses database resources. On large [Log Databases][], test the expression first and re-index outside peak hours.

---

## :fa-circle-check: Verify the Result

1. Open a [Log View][Log Views] that shows messages of the Message Type and includes the new Search Field.
2. Filter on your new Search Field with a value you saw in the test, and search.
3. Open a [Log Event][] and check that the Search Field has the expected value.

While a re-index is running, events still to be processed have the [Processing State][] **Reindexing**.

---

## :fa-triangle-exclamation: Troubleshooting

### The Search Field Wizard Button Is Missing

* The wizard and its buttons are shown to Administrators only; ask your administrator (see [Roles and Permissions][]).
* Open **View message body** on a Log Event; the button is on that view.

### The Test Shows No Value

* Check the expression syntax for the selected plugin ([XPath][] and [Allowed XPath expressions][], [JSON Path][], [RegEx][]).
* Simplify the expression to find the failing part, for example `/Order` before `/Order/Details/Item[1]/Price`.
* Check the **Encoding**: a sample read in the wrong encoding, or a leading byte order mark (BOM), can break the match.
* For a value in a context property, use a context plugin such as [Message Context Key][]; body plugins don't read the context.

### The Value Is Blank in Log Views After Re-Indexing

* The re-index may still be running: search for Log Events with the [Processing State][] **Reindexing**, and read the result in the [Log Audits][].
* The expression may not match every message of the Message Type; test it with another Log Event.
* The Log View doesn't include the Search Field, so its value stays hidden there. Add it to the Log View (see [Step 5](#fa-floppy-disk-step-5-summary)).

---

## :fa-hand-point-right: Next Steps

* :fa-gear: [Add or manage Search Field][] - Global expressions, several Message Types, and Search Field Links  
* :fa-code: [Search Field Expressions][] - How expressions run and which plugin to choose  
* :fa-eye: [Log Views][] - Search and filter on your new Search Field  
* :fa-language: [Character Encoding][] - How the encoding of a sample message is decided  

## :fa-link-horizontal: Related Topics

* :fa-question-circle: [What is a Search Field?][Search Field]  
* :fa-list: [Search Fields Overview][]  
* :fa-file-code: [XPath][]  
* :fa-brackets-curly: [JSON Path][]  
* :fa-text-slash: [RegEx][]  
* :fa-table: [Flat File CSV][]  
* :fa-align-left: [Flat File Fixed Width][]  
* :fa-key: [Message Context Key][]  
* :fa-calculator: [Formula][]  
* :fa-database: [Message Types][Message Type]  
* :fa-server: [Log Databases][]  
* :fa-shield-halved: [Roles and Permissions][]  
* :fa-user-tag: [Log Audit Search][Log Audits]  
* :fa-receipt: [Find an order by Order Id][] - How business users search on a Search Field  

[Add or manage Search Field]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Add%20or%20manage%20Search%20Field.md
[Add or manage Search Field - Data Type Options]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Add%20or%20manage%20Search%20Field.md#data-type-options
[Add or manage Search Field - How a Re-Index Runs]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Add%20or%20manage%20Search%20Field.md#how-a-re-index-runs
[Administration]:{ndr}/Administration/Overview.md
[Allowed XPath expressions]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Troubleshooting/Allowed%20XPath%20expressions.md
[Character Encoding]:{ndr}/Core%20Services/Log%20Event/Features/Character%20Encoding.md
[Choose a plugin]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Overview.md#fa-signs-post-choose-a-plugin
[Endpoints]:{ndr}/Repository%20Model/Endpoints/Overview.md
[Find an order by Order Id]:{ndr}/Getting%20Started/Scenarios/Order%20flow/Find%20an%20order%20by%20Order%20Id.md
[Flat File CSV]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Flat%20File%20CSV.md
[Flat File Fixed Width]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Flat%20File%20Fixed%20Width.md
[Formula]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Overview.md
[HideSearchFieldValuesInLogViews]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/HideSearchFieldValuesInLogViews.md
[JSON Path]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/JSON%20Path.md
[Log Audits]:{ndr}/Administration/6.%20Tools/2.%20Log%20Audit%20Search.md
[Log Databases]:{ndr}/Core%20Services/Log%20Databases/Overview.md
[Log Event]:{ndr}/Core%20Services/Log%20Event/Overview.md
[Log Views]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/What%20is%20a%20Log%20View.md
[Logging Service]:{ndr}/Core%20Services/Logging%20Service/Overview.md
[Message Context Key]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Message%20Context%20Key.md
[Message Type]:{ndr}/Repository%20Model/Message%20Types/Overview.md
[Message Types]:{ndr}/Repository%20Model/Message%20Types/Overview.md
[Processing State]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/Log%20View%20Search%20Fields%20and%20Processing%20State.md#processing-state
[RegEx]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/RegEx.md
[RegEx with capturing groups]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/RegEx%20with%20capturing%20groups.md
[Roles and Permissions]:{ndr}/Administration/3.%20Access%20Management/1.%20Roles/Features/What%20is%20a%20Role.md
[Search Field]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/What%20is%20a%20Search%20Field.md
[Search Field Expressions]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Overview.md
[Search Field Links]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/What%20is%20a%20Search%20Field.md#fa-arrow-up-right-from-square-jump-to-external-systems-with-search-field-links
[Search Fields]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/What%20is%20a%20Search%20Field.md
[Search Fields Overview]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Overview.md
[test-expression]: {ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/SearchFieldWizard_TestStepOK.png
[View details]:{ndr}/Getting%20Started/2.%20Log/Open%20a%20Log%20Event%20and%20read%20its%20message.md#view-details
[View message body]:{ndr}/Getting%20Started/2.%20Log/Open%20a%20Log%20Event%20and%20read%20its%20message.md#message-body
[Web Client]:{ndr}/Getting%20Started/Overview.md
[Which Search Field Values a Log View Shows]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/Which%20Search%20Field%20Values%20a%20Log%20View%20Shows.md
[wizard-button]: {ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/SearchFieldWizard_Button.png
[wizard-create]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/LogView_CreateSearchField.gif
[wizard-encoding]: {ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/SearchFieldWizard_ChangeEncodingOption.png
[wizard-modal]: {ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/SearchFieldWizard_New.png
[wizard-no-body]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/SearchFieldWizard_TestStep_NoMessageBody.png
[wizard-no-body-walk]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/SearchFieldWizard_NoBody.gif
[wizard-reindex]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/LogView_SearchFieldReindex.gif
[wizard-test-ticked]: {ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/SearchFieldWizard_TestStepTicked.png
[XPath]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/XPath.md
[XPath with RegEx]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/XPath%20with%20RegEx.md