# Conditional objects

**URL:** <https://discuss.elastic.co/t/conditional-objects/223507>\
**Category:** Kibana\
**Created:** [March 13, 2020, 12:34pm UTC](https://discuss.elastic.co/t/conditional-objects/223507 "2020-03-13T12:34:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![balaji\_18](https://avatars.discourse-cdn.com/v4/letter/b/bbce88/32.png) [@balaji\_18](https://discuss.elastic.co/u/balaji_18)\
**Post date:** [March 13, 2020, 12:34pm UTC](https://discuss.elastic.co/t/conditional-objects/223507/1 "2020-03-13T12:34:32Z")

</div>

Is there is any conditional objects ?

suppose if I need to ignore one location in some charts, is there any IF condition available ????

Please help me out

Thank you!

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [March 13, 2020, 1:05pm UTC](https://discuss.elastic.co/t/conditional-objects/223507/2 "2020-03-13T13:05:01Z")

</div>

There aren't conditionals in Kibana, but depending on your case you could probably solve some of it using scripted fields (which support conditionals).  
For example: you want to set a location to "Countryside" if `distance_to_center` is larger than 50.  
a doc would be something like this:  
{  
name: Woolchester,  
distance\_to\_center: 67  
location: Washington  
}  
A scripted field like this with a field called `conditional_location`:

```auto
if doc["distance_to_center"].value > 50 return "Countryside"
else return doc["location"].value

```

---

<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:** [April 10, 2020, 1:05pm UTC](https://discuss.elastic.co/t/conditional-objects/223507/3 "2020-04-10T13:05:09Z")

</div>

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