# Injest Pipeline for conditional statement used in Scripts

**URL:** <https://discuss.elastic.co/t/injest-pipeline-for-conditional-statement-used-in-scripts/298178>\
**Category:** Kibana\
**Tags:** painless, kql-kibana-query-language, ingest-pipeline\
**Created:** [February 24, 2022, 1:59pm UTC](https://discuss.elastic.co/t/injest-pipeline-for-conditional-statement-used-in-scripts/298178 "2022-02-24T13:59:00Z")\
**Posts on this page:** 1\
**Showing post:** 27

<div class="post-metadata">

**Author:** ![shivani\_singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shivani_singh/32/102450_2.png) [@shivani\_singh](https://discuss.elastic.co/u/shivani_singh)\
**Post date:** [March 2, 2022, 5:25am UTC](https://discuss.elastic.co/t/injest-pipeline-for-conditional-statement-used-in-scripts/298178/27 "2022-03-02T05:25:12Z")

</div>

> [@Tomo\_M](#):
>
> ition, you have to remove unn

Hi @Tomo_M ,  
Thank you for your efforts. I resolved this issue by using `for each` processor in the place of `2nd set`, one of the community members helped me through this -  
[Set processor isn't working after another Set processor - Injest Pipeline - Elastic Stack / Elasticsearch - Discuss the Elastic Stack](https://discuss.elastic.co/t/set-processor-isnt-working-after-another-set-processor-injest-pipeline/298478)

Thank you.

---

_[View the full topic](https://discuss.elastic.co/t/injest-pipeline-for-conditional-statement-used-in-scripts/298178)._
