You need to set tokens based on what the user has clicked. See here for docs, you will need something like this in your table where the user is supposed to click for drilldown:
<table>
<search>...
</search
<option ...>
<drilldown>
<set token="drilldown_attribute">$click.name2$</set>
</drilldown>
</table>
In the table (or events panel or chart, it's the same for all visualizations) showing only messages from the given attribute, you need something like this:
<table>
<search>
<query>source=foo attribute="$drilldown_attribute$" | table ... </query>
</search
<option ...>
</table>
Refer to the docs for more info on click.name2 and other options.
... View more