# Print Count of any particular field in watcher email body along with total Payload

**URL:** <https://discuss.elastic.co/t/print-count-of-any-particular-field-in-watcher-email-body-along-with-total-payload/259170>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [December 19, 2020, 5:04pm UTC](https://discuss.elastic.co/t/print-count-of-any-particular-field-in-watcher-email-body-along-with-total-payload/259170 "2020-12-19T17:04:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sajal](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@Sajal](https://discuss.elastic.co/u/Sajal)\
**Post date:** [December 19, 2020, 5:04pm UTC](https://discuss.elastic.co/t/print-count-of-any-particular-field-in-watcher-email-body-along-with-total-payload/259170/1 "2020-12-19T17:04:19Z")

</div>

Hi Folks ,

I am able to get ctx.payload.hits.total in an index but i want to print count of any particular feild(like how many channel session ID occured in an index) in watcher email body. How should i get that ?

Thanks  
Sajal

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 16, 2021, 5:04pm UTC](https://discuss.elastic.co/t/print-count-of-any-particular-field-in-watcher-email-body-along-with-total-payload/259170/2 "2021-01-16T17:04:35Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
