<?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: Is there a way to display a different name in a drop-down list, but use the original string value in the search using the chart replace function? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-display-a-different-name-in-a-drop-down-list/m-p/213225#M62547</link>
    <description>&lt;P&gt;The dropdown takes two parameters Name field and Value field. You could add a field for the name like | eval name_field=replace(ProcessContext_ProjectName, "Java*", "*") and then in the dropdown, use the name_field for the fieldForLabel and set value field as ProcessContext_ProjectName. &lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 08:15:40 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2020-09-29T08:15:40Z</dc:date>
    <item>
      <title>Is there a way to display a different name in a drop-down list, but use the original string value in the search using the chart replace function?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-display-a-different-name-in-a-drop-down-list/m-p/213224#M62546</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;I have a drop-down and Chart/List. The chart should show the event on the item selected from list.&lt;/P&gt;

&lt;P&gt;Is there a way display the ProcessContext_ProjectName in the drop-down list removing Java, but while searching, it should use original string?&lt;BR /&gt;
The replace function is working &lt;CODE&gt;replace "Java*" with "*"  IN  ProcessContext_ProjectName&lt;/CODE&gt;, but while doing the search below on another chart from token_projectname2 , it should pick up from the original string including Java.&lt;BR /&gt;
Right now, the chart is always giving a blank result if I do a filter by Replace.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="dropdown" token="token_projectname2" searchWhenChanged="true"&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index=u2 sourcetype=jms_body_header_txt     | dedup   ProcessContext_ProjectName | table ProcessContext_ProjectName&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;0&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;&amp;lt;/latest&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;ProcessContext_ProjectName&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;ProcessContext_ProjectName&amp;lt;/fieldForValue&amp;gt;
    &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:18:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-display-a-different-name-in-a-drop-down-list/m-p/213224#M62546</guid>
      <dc:creator>sreelesh_n</dc:creator>
      <dc:date>2020-09-29T08:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to display a different name in a drop-down list, but use the original string value in the search using the chart replace function?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-display-a-different-name-in-a-drop-down-list/m-p/213225#M62547</link>
      <description>&lt;P&gt;The dropdown takes two parameters Name field and Value field. You could add a field for the name like | eval name_field=replace(ProcessContext_ProjectName, "Java*", "*") and then in the dropdown, use the name_field for the fieldForLabel and set value field as ProcessContext_ProjectName. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:15:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-display-a-different-name-in-a-drop-down-list/m-p/213225#M62547</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2020-09-29T08:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to display a different name in a drop-down list, but use the original string value in the search using the chart replace function?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-display-a-different-name-in-a-drop-down-list/m-p/213226#M62548</link>
      <description>&lt;P&gt;hi sreelesh_n,&lt;/P&gt;

&lt;P&gt;try to write like this: &lt;CODE&gt;replace "Java *" WITH "*"  IN  ProcessContext_ProjectName&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;if that does not work, please me you post your entire code and then I can look at the problem.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2016 21:01:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-display-a-different-name-in-a-drop-down-list/m-p/213226#M62548</guid>
      <dc:creator>gyslainlatsa</dc:creator>
      <dc:date>2016-01-04T21:01:11Z</dc:date>
    </item>
  </channel>
</rss>

