Use Time Picker parameters in scripts


#1

Is it possible to access the Time Picker parameters (i.e. start time and end time) from a Painless script in a visualization? It would be very useful to define ranges and filters dynamically based on the "main" time field.


(Mark Walkom) #2

No it's not.
Are you running this as a scripted field?


#3

No, but I would like to. Can this be done in some other way?


(Mark Walkom) #4

I am not sure it makes sense to use it in a scripted field attached to a doc, because the time picker will be applied to those docs.

What exactly do you want to do here, what's the end goal?


#5

Actually I wouldn't attach it to a doc (sorry, I misinterpreted the "scripted field" bit in your answer), but rather to a bucket aggregation JSON input; say, if I want to create a filter with a date range starting at the end time of the selected time frame.


(system) #6

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