Message Context Key Search Field Expression Plugin
Section titled “ Message Context Key Search Field Expression Plugin”The Message Context Key plugin returns the value of one context property of a Log Event, looked up by its exact key. There's no pattern and no parsing: the whole value becomes the Search Field value. Use it when a context property already holds exactly the value you want, such as an order number or a file name set by the sender.
- ✅ Simplest way to read a context value: enter the key, get the value
- ✅ Reads only the context properties; the message body is never read

Animated walkthrough: the key CustomerName on the context of a logged Order-to-Cash order confirmation returns the value Northwind Traders, as it is.
When to use it
Section titled “ When to use it”Message Context Key and the four RegEx plugins cover the combinations of where the text is and what part of it you want. For every plugin, see Choose a plugin.
| Your data | You want | Use |
|---|---|---|
| One context value (you know the key) | The value as it is, no pattern | Message Context Key (this page) |
| One context value (you know the key) | The whole match of a pattern | RegEx on Message Context |
| One context value (you know the key) | Only the part inside a capturing group ( ) |
RegEx on Message Context with capturing groups |
| XML stored in a context value | An XPath result | XPath on Message Context |
| Message body | The whole match of a pattern | RegEx |
| Message body | Only the part inside a capturing group | RegEx with capturing groups |
| Several keys that match a pattern | Their values | Formula with context(regex('…')) |
Expression syntax
Section titled “ Expression syntax”Select Message Context Key in the Type list and enter the key in the Expression field.

The Message Context Key plugin in the Type list.
- The Expression is the key itself, not a pattern. Write it exactly as it's logged: the key is case-sensitive, so
customernamedoesn't findCustomerName. - The whole value is returned as it is, for example a full file path.
- BizTalk context properties are logged as namespace#property, for example
http://schemas.microsoft.com/BizTalk/2003/file-properties#ReceivedFileName. - Context properties and the reserved keys are described in Context Options. Properties that the ContextPropertiesFilters System Parameter removes aren't kept, so don't base a Search Field on them.
- To test, add the key and its value on the Message Context tab of Test Expression. When the key is missing, the test reports Processed with warning: The Expression yields no result:

Test result when the key isn't among the context properties.
Configure and test the expression as described in Add or manage Search Field and Test Your Expression.
Examples
Section titled “ Examples”Example 1: Return the value of a custom context key
Section titled “Example 1: Return the value of a custom context key”| Key | Value |
|---|---|
ProductOfTheYear |
Nodinite |
Expression
Section titled “Expression”ProductOfTheYearResult
Section titled “Result”Nodinite
Test Expression: the value of ProductOfTheYear from the Message Context tab.
Example 2: Return the full path of the file that BizTalk received
Section titled “Example 2: Return the full path of the file that BizTalk received”| Key | Value |
|---|---|
http://schemas.microsoft.com/BizTalk/2003/file-properties#ReceivedFileName |
C:\Integration\In\Orders\PO_4711.xml |
Expression
Section titled “Expression”http://schemas.microsoft.com/BizTalk/2003/file-properties#ReceivedFileNameResult
Section titled “Result”C:\Integration\In\Orders\PO_4711.xmlTo keep only the file name PO_4711.xml, use RegEx on Message Context with ([^\\]+$).

The full namespace#property key returns the logged value as it is.