# How to add a field to the rule-action variable 'context'

**URL:** <https://discuss.elastic.co/t/how-to-add-a-field-to-the-rule-action-variable-context/368075>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [October 1, 2024, 9:19am UTC](https://discuss.elastic.co/t/how-to-add-a-field-to-the-rule-action-variable-context/368075 "2024-10-01T09:19:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hpz](https://avatars.discourse-cdn.com/v4/letter/h/ea5d25/32.png) [@hpz](https://discuss.elastic.co/u/hpz)\
**Post date:** [October 1, 2024, 9:19am UTC](https://discuss.elastic.co/t/how-to-add-a-field-to-the-rule-action-variable-context/368075/1 "2024-10-01T09:19:30Z")

</div>

Hi,

anybody knows if it is possible to add a field value from the rule filter to the context variable as part of the [rule-action variables](https://www.elastic.co/guide/en/kibana/current/rule-action-variables.html).  
I would like to print some field values in my action message, like e.g. '{{context.myfield}}'  
Thanks for any hint.
