# Syntax for Pipeline Processor Condition in Kibana

**URL:** <https://discuss.elastic.co/t/syntax-for-pipeline-processor-condition-in-kibana/320303>\
**Category:** Kibana\
**Created:** [December 1, 2022, 10:37pm UTC](https://discuss.elastic.co/t/syntax-for-pipeline-processor-condition-in-kibana/320303 "2022-12-01T22:37:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wpm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wpm/32/110146_2.png) [@wpm](https://discuss.elastic.co/u/wpm)\
**Post date:** [December 1, 2022, 10:37pm UTC](https://discuss.elastic.co/t/syntax-for-pipeline-processor-condition-in-kibana/320303/1 "2022-12-01T22:37:04Z")

</div>

I would like to write a pipeline that drops the field "A" from a document when its value is the string "None". I want to do this in the Kibana UI.

I figure I need a Remove processor when runs on the condition that A == "None". I'm at this point in the UI.

 ![kibana condition](https://us1.discourse-cdn.com/elastic/original/3X/0/c/0c4d56536c8f327c950602f832e5123964954000.jpeg)

What should I type in the "Condition" box? I've tried various combinations of A == "None" with different quotation mark arrangements and either they don't parse or have no effect.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [December 1, 2022, 10:50pm UTC](https://discuss.elastic.co/t/syntax-for-pipeline-processor-condition-in-kibana/320303/2 "2022-12-01T22:50:52Z")

</div>

So you should probably read about [conditionals](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html#conditionally-run-processor)

Basically you put in what is between the double quotes so for

```auto
   {
      "set": {
        "field": "test",
        "value": "25",
        "if": "ctx.other_field == 'test'"
      }
    }

```

so try

`ctx.other_field == 'test'`

 ![Screen Shot 2022-12-01 at 2.50.32 PM](https://us1.discourse-cdn.com/elastic/original/3X/a/3/a3f26f326f02ef049bb4d7dcd3d1df2b5e0d21dc.png)

The `ctx` is the [ingest processor context](https://www.elastic.co/guide/en/elasticsearch/painless/8.5/painless-ingest-processor-context.html)

From the example

`"if": "ctx?.network?.name == 'Guest'"`

you would enter

`ctx?.network?.name == 'Guest'`

---

<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:** [December 29, 2022, 10:51pm UTC](https://discuss.elastic.co/t/syntax-for-pipeline-processor-condition-in-kibana/320303/3 "2022-12-29T22:51:25Z")

</div>

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