# Lookup fields / index

**URL:** <https://discuss.elastic.co/t/lookup-fields-index/283680>\
**Category:** Kibana\
**Created:** [September 8, 2021, 2:48pm UTC](https://discuss.elastic.co/t/lookup-fields-index/283680 "2021-09-08T14:48:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tuckson](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@Tuckson](https://discuss.elastic.co/u/Tuckson)\
**Post date:** [September 8, 2021, 2:48pm UTC](https://discuss.elastic.co/t/lookup-fields-index/283680/1 "2021-09-08T14:48:07Z")

</div>

Hi,

Consider an index with a field with error-codes in it (version 7.14.1) .  
Is it possible to (for example) have another index (or another way to store a list of key:value data) with the errorcode as key and a descriptive name and/or even a longer description, and to have it replaced in reports and dashboards so people see the meaningful name / description instead of just the code?

Cheers,

---

<div class="post-metadata">

**Author:** ![dosant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dosant/32/64489_2.png) [@dosant](https://discuss.elastic.co/u/dosant)\
**Post date:** [September 8, 2021, 4:48pm UTC](https://discuss.elastic.co/t/lookup-fields-index/283680/2 "2021-09-08T16:48:51Z")

</div>

I'd use a "static lookup" field formatter for this.  
Edit index pattern -\> edit field -\> add static lookup formatter

> Is it possible to (for example) have another index (or another way to store a list of key:value data)

I don't think this is possible, but I think to avoid manually populating the list for each error code field in every index pattern you need you could automate this by using Index Pattern API (experimental) [Update index pattern fields API | Kibana Guide [8.11] | Elastic](https://www.elastic.co/guide/en/kibana/current/index-patterns-fields-api-update.html) to apply a field formatter to a field.

An alternative to a static lookup field formatter could be a runtime field. You could define a new field on an index pattern that would infer error description from an error code. You could add this field from index pattern management or using an API (experimental)

---

<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:** [October 6, 2021, 4:49pm UTC](https://discuss.elastic.co/t/lookup-fields-index/283680/3 "2021-10-06T16:49:31Z")

</div>

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