My sample file:
State , District , Total Enrolments
Andaman_and_Nicobar_Islands, Andamans,116866>
Andaman_and_Nicobar_Islands, Port_Blair,2
Andhra_Pradesh, Hyderabad,5004246
Andhra_Pradesh, Ananthapur,92
Arunachal_Pradesh, West_Kameng,143
Arunachal_Pradesh, Lohit,77
I have to get State values in dropdown based on selection, District and enrol values have to show.
My advanced XML form shown below:
<?xml version='1.0' encoding='utf-8'?>
You've left a few things in the XML set to the values from the example, .
The examples all use a "series" field, whereas here you want it to pull from a field called "State".
You've got series=$series$
in your search, when you want to have State="$State$
.
You also have token=series
, which is what tells the system you want to use $series$ in your searches to identify the token. You want to change that to token="State"
You then have fieldForValue="series" fieldForLabel="series"
. This tells the dropdown to look for it's values in a field called series
, which of course wont be there. Change those both to be State
.
You've left a few things in the XML set to the values from the example, .
The examples all use a "series" field, whereas here you want it to pull from a field called "State".
You've got series=$series$
in your search, when you want to have State="$State$
.
You also have token=series
, which is what tells the system you want to use $series$ in your searches to identify the token. You want to change that to token="State"
You then have fieldForValue="series" fieldForLabel="series"
. This tells the dropdown to look for it's values in a field called series
, which of course wont be there. Change those both to be State
.
Thanks sideview
I can able to get results when I click on search button. but in dropdown, I'm unable to retrieve States.
Im Sorry Im working on forms.
Thanks Martin,
I have followed as example given in the Splunk UI Examples(form_dropdown.xml).
That doesn't look like Advanced XML to me, see http://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/AdvancedFormSearch