Create URL scripted field to view surrounding documents (SOLVED)

I'm trying to create a scripted field which is will be a URL to view the surrounding documents of the log.
I've found that if I give the document id of the log. In the view surrounding logs link it brings the surrounding logs of the log of which the document id was given. I wanted to create a scripted field as a link on which you click and it redirects to the surrounding log link of that log.

I have created a link scripted field before too but mostly I have given static values in the input label for link. I was wondering is there any way I can send the document id of the log as a value to the link.

"http://localhost:5601/app/kibana#/context/312de3f0-5281-11e8-8eb8-3bb6f14d4c1f/doc/wcO_PmMBs1Vt6Gv23RVl?_a=(columns:!(_source),filters:!(),predecessorCount:5,sort:!(logTimestamp,desc),successorCount:5)&_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:'2018-04-30T19:00:00.000Z',mode:absolute,to:'2018-05-31T18:59:59.999Z'))"

document id = wcO_PmMBs1Vt6Gv23RVl
In the above url "wcO_PmMBs1Vt6Gv23RVl" is the document Id.

Is there any way i can send the document id of the log (on which the scripted field is created) in the url.

Does something like:

work for you?

Yes this worked. Thank you!

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