<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: drop down  menu with source in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24758#M3950</link>
    <description>&lt;P&gt;Something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex mode=sed field=source "s/\\/\\\\/g"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or similar should get you going. Splunkweb can be a bit tricky to work with when it comes to backslashes so you might need to apply more or less, but that's just a matter of playing around a bit &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Nov 2012 09:02:11 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2012-11-07T09:02:11Z</dc:date>
    <item>
      <title>drop down  menu with source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24750#M3942</link>
      <description>&lt;P&gt;Is it not possible to create a Drop Down menu populating source files as the input?&lt;BR /&gt;
I have tried using both simple xml and advanced xml. the source filename is replaced in the view results but results are not obtained.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2012 10:27:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24750#M3942</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2012-11-06T10:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: drop down  menu with source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24751#M3943</link>
      <description>&lt;P&gt;Could you explain more clearly what you're trying to do? What is replaced, what results are you talking about etc...&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2012 10:35:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24751#M3943</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-11-06T10:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: drop down  menu with source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24752#M3944</link>
      <description>&lt;P&gt;In my form i need a drop down box and a flaschart. the dropdown box is populated with source and by selecting the source a search is done and i should get a chart.&lt;BR /&gt;
the search query used to populate drop down box is like&lt;BR /&gt;
index=main sourcetype=* | top source &lt;BR /&gt;
and it is populated with all the source values . good!.&lt;BR /&gt;
then my search template is like&lt;BR /&gt;
index=main source=$tokenusedindropdown$ mysearch| chart count by Field_PC&lt;BR /&gt;
i am pretty sure than the query will work properly to obtain the chart. issue here is the filepath&lt;BR /&gt;
single backslash on source filepath should replaced by double. i tried rex using 'sed' and 'sedcmd'&lt;BR /&gt;
still not work&lt;BR /&gt;
please help&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2012 10:51:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24752#M3944</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2012-11-06T10:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: drop down  menu with source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24753#M3945</link>
      <description>&lt;P&gt;You can check what the search looks like if you choose the "Jobs" link to the upper right in splunkweb. There you can confirm if the search looks as it should or if there is something wrong with it.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2012 10:58:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24753#M3945</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-11-06T10:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: drop down  menu with source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24754#M3946</link>
      <description>&lt;P&gt;I am sure about my search query as i used it with text box inputs and saved searches. now i inspected through 'jobs' as AYN suggested, there too i found the filepath as the issue. can u help me with a rex to replace sourcefilename.&lt;BR /&gt;
i tried with '/s', as i am not good in rex, i am not able to debug the issue&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2012 11:12:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24754#M3946</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2012-11-06T11:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: drop down  menu with source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24755#M3947</link>
      <description>&lt;P&gt;Hint: If you're searching for the source field, &lt;CODE&gt;| metadata type=sources index=&amp;lt;index&amp;gt;&lt;/CODE&gt; is going to be &lt;STRONG&gt;much&lt;/STRONG&gt; faster than &lt;CODE&gt;index=main | top source&lt;/CODE&gt;. The latter has to search all of the data in the index, while the former only consults the metadata. Much less information is read from disk, and the search will be much faster.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2012 15:15:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24755#M3947</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-11-06T15:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: drop down  menu with source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24756#M3948</link>
      <description>&lt;P&gt;Additionally, you will want to transform the 'source' field to accommodate Windows paths before setting it in the replacement token (i.e., as part of your search to populate the pulldown). See &lt;A href="http://splunk-base.splunk.com/answers/54904/replacing-with-sedcmd"&gt;this answer&lt;/A&gt; for a helpful regex.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2012 16:14:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24756#M3948</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-11-06T16:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: drop down  menu with source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24757#M3949</link>
      <description>&lt;P&gt;so Do i have to use transformation for the source field? can u suggest the regex needed to transform the backslash in source file name to double backslash&lt;BR /&gt;
thanks&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2012 06:02:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24757#M3949</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2012-11-07T06:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: drop down  menu with source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24758#M3950</link>
      <description>&lt;P&gt;Something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex mode=sed field=source "s/\\/\\\\/g"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or similar should get you going. Splunkweb can be a bit tricky to work with when it comes to backslashes so you might need to apply more or less, but that's just a matter of playing around a bit &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2012 09:02:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24758#M3950</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-11-07T09:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: drop down  menu with source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24759#M3951</link>
      <description>&lt;P&gt;Thanks Ayn , but i already tried it and i am getting an error. "Error in 'rex' command: Failed to initialize sed. Failed to parse the regex to replace."&lt;BR /&gt;
But when i tried with replace *\* with *\\* in source, it worked for first backslash and i am playing around to make it happen for all the slashes&lt;BR /&gt;
THANK YOU&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2012 10:05:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24759#M3951</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2012-11-07T10:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: drop down  menu with source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24760#M3952</link>
      <description>&lt;P&gt;Like I said, you might need to play around a bit with the number of backslashes, due to the way Splunkweb handles things. Don't stop trying just because you got an error with that specific regex I showed you.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2012 10:12:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24760#M3952</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-11-07T10:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: drop down  menu with source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24761#M3953</link>
      <description>&lt;P&gt;i was wondering that when i am trying with replace command&lt;BR /&gt;
&lt;PRE&gt;    "...|replace *\* with *\\* in source" &lt;BR /&gt;
(asterisk followed by 2 or 4 slashes and then asterisk again)&lt;BR /&gt;
, it worked well for first backslash.&lt;BR /&gt;
'C:/folder/filename.txt' is replaced by 'C://folder/filename.txt' i wish it happened for the second slash also.&lt;BR /&gt;
THANK YOU&lt;/PRE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2012 10:21:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24761#M3953</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2012-11-07T10:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: drop down  menu with source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24762#M3954</link>
      <description>&lt;P&gt;From the docs on replace: "Replaces a single occurrence of the first string with the second within the specified fields". You can't use replace. Use rex.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2012 10:23:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24762#M3954</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-11-07T10:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: drop down  menu with source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24763#M3955</link>
      <description>&lt;P&gt;ha, finally it worked with this regex.. if somebody knows much effective one please help.. &lt;BR /&gt;
   ..| rex mode=sed field=source  &lt;CODE&gt;"s/\\\{1}/\\\\\//g"&lt;/CODE&gt; | rex mode=sed field=source  "s/\///g"&lt;/P&gt;

&lt;P&gt;THANK YOU&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2012 11:13:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24763#M3955</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2012-11-07T11:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: drop down  menu with source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24764#M3956</link>
      <description>&lt;P&gt;hi smolcj&lt;/P&gt;

&lt;P&gt;Actually i am also facing the same problem..i have created the view and i have  the sources in the form of link lister &lt;/P&gt;

&lt;P&gt;my doubt is in which piece of code we hav to use this above command&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2012 13:08:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24764#M3956</guid>
      <dc:creator>splunkpoornima</dc:creator>
      <dc:date>2012-11-15T13:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: drop down  menu with source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24765#M3957</link>
      <description>&lt;P&gt;as i mentioned, i am using a dropdown box in this view.i.e. user will select a source from the dropdown box and he will get some statistics of that source, number of event bla bla bla... so i used this rex along with the search used to populate the dropdown box.&lt;BR /&gt;
hop it helped you&lt;BR /&gt;
thanks&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2012 13:15:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24765#M3957</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2012-11-15T13:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: drop down  menu with source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24766#M3958</link>
      <description>&lt;P&gt;you are right.. replace is for onetime use.. thank you&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2012 13:16:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/drop-down-menu-with-source/m-p/24766#M3958</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2012-11-15T13:16:57Z</dc:date>
    </item>
  </channel>
</rss>

