Splunk Search

multiselect table rows

493669
Super Champion

Hi,
I am currently trying to multi-select table rows. So basically I want to select multiple rows and on selction ,selected rows fields values get store(like in SQL using select query) and below table one button will be present .On clicking that button, the selected rows (field values) get stored in lookup (using outputlookup query).
Is it Possible in Splunk.
Any pointers to this will really help.

Thanks,

1 Solution

kamlesh_vaghela
SplunkTrust
SplunkTrust

HI,

To select row is not direclty possible but yes you can achieve this.

1) In the table view, add one more column which will display the checkbox for each row. (using javascript)
2) Declare a javascript variable, like array type, which store table row value on tick and remove on untick of checkbox.
3) Add a button below table view and define a onclick function, which executes outputlookup search for selected table rows( which is stored into javascript vaiable) and stores it into lookup.

Is this approach ok for you?

Thanks

View solution in original post

spkriyaz
Path Finder

@kamlesh_vaghela  could you please check my use case as well, i was able to get some insights from this answer but finding difficult to implement. Any help would be appreciate, please see the below question
https://community.splunk.com/t5/Dashboards-Visualizations/Need-help-in-applying-checkbox-in-splunk-t...

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@spkriyaz 

Please check my answer on your question. 

0 Karma

493669
Super Champion

Thanks kamlesh_vaghela

0 Karma

niketn
Legend

@493669, what you have request is like a web form kind of functionality and for best behavior and control you must include JavaScript. Submit button should have JavaScript based functionality. So pick up on Simple XML CSS Extension and JS Extension followed by Splunk JS Stack in case you want to have more control over your dashboards and specially if Use Cases are out of what Splunk provides in the box.

Just FYI, I have provided a complete Simple XML Solution with Run anywhere Dashboard Example which you can try out and confirm.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

koshyk
Super Champion

I hope the question is related to front-end UI ?

If yes, we had done similar using
- multiselect input element
- Display a table to end user and provide a multiselect input option with table column headers in the list. Let the user select the multiple headers and this can be passed to a search
- And on the button, enable the search with outputlook to csv file.

You can install the Splunk Dashboard Example app to see how the multi-select element works.
hope this helps

0 Karma
Get Updates on the Splunk Community!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...