Link two dropdown select visualisations Kibana Canvas

Hi,

I've created a canvas with two dropdown selects (One for customer and one for projects)
Is there a way to link those, like a parent and child? If I select a customer in the first dropdown select. I want only to see the projects from that customer in the other dropdown select.


I'm on Kibana 7.9.3 and Elastic 7.9.1

cc @poff @Catherine_Liu

Hi @r97

Here is an example of how to accomplish this.

For the filter that you want to serve as the "Parent" filter, give it a FilterGroup value. The expression will look something like this:

essql query="SELECT user, order_id FROM "kibana_sample_data_ecommerce"
| dropdownControl valueColumn="user" filterColumn="user" filterGroup="by-user"
| render

Then, use the filter value from the parent to filter the options available in the child. It's expression will look something like.

filters group='by-user'
| essql query="SELECT user, order_id FROM "kibana_sample_data_ecommerce"
| dropdownControl valueColumn="order_id" filterColumn="order_id" filterGroup="by-order"
| render

Now, wherever you want to filter by the selected child value, just use filters group="by-order" or whatever name you give for that child group.

Hope that helps!

Thank you! It works like a charm! Is there a way to do this also for the Dashboard dropdown controls without greying out the child value? So i could still select the child if the parent is not set?

@corey.robertson Have you seen my reply?

Hi @r97
Hmm I'm not sure how to accomplish this in a Dashboard. The drop down controls in a dashboard are strictly populated based on the index pattern, so I'm not sure how to filter those options further.

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