I've recently started using Elastic. While working on my dashboard I faced a problem. I want to add an options list but the information I'm interested in is located in 3 different fields: Level 1, Level 2, Level 3. All these fields contain the values with the particular pattern I'm interested in AAA and other values. - For example, AAA oncology can be in Level 1 and AAA neuroscience can be in Level 3. I want to create an options list with two variants based on the pattern: AAA and non AAA.
Can you help me, please?
Hi @iraidalavrovaa, this is a good question! We are currently working on a new version of the Controls system which will eventually allow you to supply
custom options for an options List control. In this case, the two options would be associated with a set of filters, which would be applied invisibly when the option is selected.
Unfortunately, this is currently not possible with the Input Controls, but there are workarounds using other systems on the dashboard! Firstly, you'd want to create the three filters that make the dashboard show only AAA Levels. You can do this using the
add filter dialog, and choosing
Edit as Query DSL. From there, you can add a Wildcard query to include only documents that include
This DSL might look something like:
Repeat this process 3 times for each level field. You can also give the filters a custom name, to hide the scripts they're based on.
After this, you can save the query, making sure that
Include filters is checked. You can also give it a good name here!
Then you can click hit
exclude results on each filter, and save the query as a new saved query with a different name. This way, users of the dashboard can easily switch between viewing
Non AAA. It's not as user friendly as an options list, but it's the best we have so far.
@devon.thomson thank you for your help!
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.