# Painless Script with name contain dot

**URL:** <https://discuss.elastic.co/t/painless-script-with-name-contain-dot/249231>\
**Category:** Kibana\
**Tags:** painless\
**Created:** [September 20, 2020, 3:08am UTC](https://discuss.elastic.co/t/painless-script-with-name-contain-dot/249231 "2020-09-20T03:08:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Narendra\_Jain](https://avatars.discourse-cdn.com/v4/letter/n/2bfe46/32.png) [@Narendra\_Jain](https://discuss.elastic.co/u/Narendra_Jain)\
**Post date:** [September 20, 2020, 3:08am UTC](https://discuss.elastic.co/t/painless-script-with-name-contain-dot/249231/1 "2020-09-20T03:08:00Z")

</div>

Hi,  
I have field name with dot. like param.request\_id, this is actual field name and not

Actual:

```javascript
{
   "param.request_id": 12343
}

```

Not like

```javascript
{
 "param" : { 
   "request_id": 12343
  }
}

```

. when i try scripted filed

```java
if (doc.containsKey('param.request_id')) { 
    doc['param.request_id.keyword'].value 
}

```

However this code don't return any doc, instead it failed with script exception. is there a way to escape dot

---

<div class="post-metadata">

**Author:** ![Mikhail\_Shustov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikhail_shustov/32/49186_2.png) [@Mikhail\_Shustov](https://discuss.elastic.co/u/Mikhail_Shustov)\
**Post date:** [September 23, 2020, 10:59am UTC](https://discuss.elastic.co/t/painless-script-with-name-contain-dot/249231/2 "2020-09-23T10:59:17Z")

</div>

Hi. Have you tried to access the field as suggested in [Fields with a "dot" in them do not persist](https://discuss.elastic.co/t/fields-with-a-dot-in-them-do-not-persist/234965/2) ?

---

<div class="post-metadata">

**Author:** ![Narendra\_Jain](https://avatars.discourse-cdn.com/v4/letter/n/2bfe46/32.png) [@Narendra\_Jain](https://discuss.elastic.co/u/Narendra_Jain)\
**Post date:** [October 3, 2020, 2:21am UTC](https://discuss.elastic.co/t/painless-script-with-name-contain-dot/249231/3 "2020-10-03T02:21:15Z")

</div>

Thanks for the reference, i still have error due to this field is not available in all documents, basically i have query param extracted out as `param.request_id` or in other case i have `param.input_id`  
in my product they all mean the same thing so i want to point to product page link reference this unique id, and in kibana table i want to refer it as one derived field.

---

<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 31, 2020, 2:21am UTC](https://discuss.elastic.co/t/painless-script-with-name-contain-dot/249231/4 "2020-10-31T02:21:34Z")

</div>

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