# Help needed using a column of results returned in a second query (Chained input)

**URL:** https://discuss.elastic.co/t/help-needed-using-a-column-of-results-returned-in-a-second-query-chained-input/286809
**Category:** Elasticsearch
**Tags:** elastic-stack-alerting
**Created:** [October 15, 2021, 9:00am UTC](https://discuss.elastic.co/t/help-needed-using-a-column-of-results-returned-in-a-second-query-chained-input/286809 "2021-10-15T09:00:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![SamHunt](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@SamHunt](https://discuss.elastic.co/u/SamHunt)
#### Post date: [October 15, 2021, 9:00am UTC](https://discuss.elastic.co/t/help-needed-using-a-column-of-results-returned-in-a-second-query-chained-input/286809/1 "2021-10-15T09:00:52Z")

</div>

Help needed using a column of results returned in a second query (Chained input).

I'm aware of an example in the docs showing chained input but it does not seem to work or be suitable for adaptation.

I would like the first search to return a list of unique ID's that are used as part of the second query, this will eventually be a watcher job so I would like it to run in a "single" query.

Any help is useful, thanks

---

<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: [November 12, 2021, 9:01am UTC](https://discuss.elastic.co/t/help-needed-using-a-column-of-results-returned-in-a-second-query-chained-input/286809/2 "2021-11-12T09:01:02Z")

</div>

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