Dashboards & Visualizations

hide textbox and search button in drilldown

SrinivasaC
Path Finder

--In my drill down resultant form shown below.
-- It is creating input text box with search button.
-- my requirement is not to show "input text box" and "search" button. only required results on drilldown resultant form.

sourcetype=logins $username$
100

Thanks in advance.. 🙂

Tags (1)
0 Karma
1 Solution

sowings
Splunk Employee
Splunk Employee

Use <drilldown> markers to define your own form as output, one that doesn't have the search text box. (In other words, just a dashboard that takes a query from the URL bar.)

See here for more details:

http://docs.splunk.com/Documentation/Splunk/latest/Viz/Dynamicdrilldownindashboardsandforms

View solution in original post

0 Karma

ehudb
Contributor

Apparently you can do it very easily by:

  • Reference your token in the target dashboard as any token: search index=... field=$token$
    • Use the url to give value to the token searchhead:8000/en-US/app/search/mytarget?token=value1 searchhead:8000/en-US/app/search/mytarget?token=value2

So you don't have to create input in the dashboard for the token to work.

0 Karma

sowings
Splunk Employee
Splunk Employee

Use <drilldown> markers to define your own form as output, one that doesn't have the search text box. (In other words, just a dashboard that takes a query from the URL bar.)

See here for more details:

http://docs.splunk.com/Documentation/Splunk/latest/Viz/Dynamicdrilldownindashboardsandforms

0 Karma

sowings
Splunk Employee
Splunk Employee

The base search within the dashboard is what will display unless you provide some additional data. When the target is a <dashboard>, you have to feed the whole search string as q= in the drilldown link. Since you're typically reaching the target dashboard by clicking on something, the username to search for is provided by the drilldown mechanism. If you go to the dashboard without any input (i.e., not clicked from somewhere else), you'll get the results from whatever search is written into the dashboard itself.

0 Karma

SrinivasaC
Path Finder

Thanks Sowings...
I'm surprised when I test above code snippet with your answer, i.e I have removed $username$ in target dashboard. its showing all the results without condition. But I wanna show result for particular selected user only.. Plz help me.

0 Karma

sowings
Splunk Employee
Splunk Employee

<drilldown>
<link>
/app/MyApp/individual_customer_details?q=sourcetype%3dlogins $click.value$
</link>
</drilldown>

You might have to put the link inside a CDATA because of the equals sign. See the link below for details:

http://docs.splunk.com/Documentation/Splunk/latest/Viz/Dynamicdrilldownindashboardsandforms

0 Karma

sowings
Splunk Employee
Splunk Employee

Ah, sorry. The drilldown target should be set as a <dashboard> -- this type of visualization doesn't have a search button or anything like that. You'll want to send the entire search string to the target view as "q=". Note that you can't use searchTemplate in a dashboard, you'll have to make it a searchString as a child of the <event> element.

0 Karma

SrinivasaC
Path Finder

--In my drill down resultant form shown below.
-- It is creating input text box with search button.
-- my requirement is not to show "input text box" and "search" button. only required results on drilldown resultant form.

sourcetype=logins $username$
100

Thanks in advance.. 🙂

0 Karma

SrinivasaC
Path Finder

Thanks for your reply Sowings...

Actual my drilldown page as below:



User Salary Details by Yearly
User Salary Details by Yearly
column


/app/MyApp/individual_customer_details?form.username=$click.value$



With the above code in drilldown, it is displaying input text field and search button. But I dont need of those, Jus result need to display for particular customer.

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...