All Apps and Add-ons

Export Results from a FORM to a .csv file

alenseb
Communicator

Hi Guys,

I have developed a form which takes in two values as Input into a query.
Now i want to export the results into a .csv file.

I know that its possible in a view by adding "module name=Export".

So is it possible to add Module tag in a form.

Or is there any other way to do this??

Please help!!

0 Karma
1 Solution

jonuwz
Influencer

See here

You probably need to be using advanced XML for this. Do you display the results on the form too ?

Update

Backup the XML in your form

Load your view, now add '?showsource=t' to the end of the URL and hit enter.

Scroll down to the box with all the xml in it - copy it.

Go back, and edit hte XML in your view.

Remove everything and paste in the advanced XML, press save.

Make sure the view loads properly.

Edit it again, now add

<module name="Export"/>

at the same node level as <module name="SimpleResultsTable" .... >

Save

You should see the export button

View solution in original post

jonuwz
Influencer

See here

You probably need to be using advanced XML for this. Do you display the results on the form too ?

Update

Backup the XML in your form

Load your view, now add '?showsource=t' to the end of the URL and hit enter.

Scroll down to the box with all the xml in it - copy it.

Go back, and edit hte XML in your view.

Remove everything and paste in the advanced XML, press save.

Make sure the view loads properly.

Edit it again, now add

<module name="Export"/>

at the same node level as <module name="SimpleResultsTable" .... >

Save

You should see the export button

alenseb
Communicator

The Advanced Form Search XML solved my problem.
Here is the link
http://docs.splunk.com/Documentation/Splunk/5.0.1/AdvancedDev/AdvancedFormSearch

0 Karma

jonuwz
Influencer

see update to answer

0 Karma

alenseb
Communicator

I have a searchTemplate, fieldset,row & Table Tags in my Form.
So where can i add a module tag?
Will this add a button onto the screen.

0 Karma

jonuwz
Influencer

Not at all. I have several forms with exports. Can you post the XML definition of your form? It should simply be a matter of adding <module name="Export"/> in the right place

0 Karma

alenseb
Communicator

Yeah..
I display the results on the form itself.

So are you saying i cannot use CSV export if i am using form ??

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...