<?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: How to change name of results dynamically in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251751#M15678</link>
    <description>&lt;P&gt;Make sure that you are doing the tokening correctly.  Download this app and check out the examples:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/1603/"&gt;https://splunkbase.splunk.com/app/1603/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Check out the code for "Token Customization" examples.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jan 2017 18:47:52 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-01-24T18:47:52Z</dc:date>
    <item>
      <title>How to change name of results dynamically</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251743#M15670</link>
      <description>&lt;P&gt;I have this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=nitro_iPad | rex "iPad-ip(?&amp;lt;storeNum&amp;gt;[^-]+)"  | rex "iOS(?&amp;lt;osversion&amp;gt;[^-]+)"  | table osversion storeNum | dedup storeNum
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is an image of my results:&lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/178186-capture.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;I want to alter my results so when it says ####j it would be ####_skate but for all of the letters present for example 1529k would turn into 1529_candy. &lt;/P&gt;

&lt;P&gt;I figure a rename function would work but I tried to no avail I am guessing I just did it incorrectly.&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:32:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251743#M15670</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2020-09-29T12:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to change name of results dynamically</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251744#M15671</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=storeNum mode=sed "s/\D+$/_candy/"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Jan 2017 15:33:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251744#M15671</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-01-24T15:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to change name of results dynamically</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251745#M15672</link>
      <description>&lt;P&gt;Hi JoshuaJohn,&lt;BR /&gt;
try to add to your search something like this (I inserted in case function only two options, but you can insert other):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval storeNum=substr(storeNum,1,4)+case(substr(storeNum,5)="j","_skate",substr(storeNum,5)="k","_candy")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 15:35:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251745#M15672</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-01-24T15:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to change name of results dynamically</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251746#M15673</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nitro_iPad | rex "iPad-ip(?&amp;lt;storeNum&amp;gt;[^-]+)"  | rex "iOS(?&amp;lt;osversion&amp;gt;[^-]+)"  | table osversion storeNum | eval storeNum=case(match(storeNum,"^\d+j$"),replace(storeNum,"^(\d+)j","\1_skate"),match(storeNum,"^\d+w+$"), replace(storeNum,"^(\d+)\w+$","\1_candy"),true(),storeNum) | dedup storeNum
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Jan 2017 15:49:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251746#M15673</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-24T15:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to change name of results dynamically</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251747#M15674</link>
      <description>&lt;P&gt;This works but it will completely ignore ones without a letter behind the name like 0126 &lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 17:02:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251747#M15674</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2017-01-24T17:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to change name of results dynamically</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251748#M15675</link>
      <description>&lt;P&gt;Also works but the problem I am having here is with situations like 1502aa which would be 1502_marshmallow but 1407a would be 1407_crush instead 1502 would show up like this 1502_marshmallow_crush.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:32:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251748#M15675</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2020-09-29T12:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to change name of results dynamically</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251749#M15676</link>
      <description>&lt;P&gt;Then you chain them up like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | rex field=storeNum mode=sed "s/k$/_candy/ s/aa$/_marshmallow/ s/a$/_crush/"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Jan 2017 18:22:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251749#M15676</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-01-24T18:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to change name of results dynamically</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251750#M15677</link>
      <description>&lt;P&gt;I am getting a weird search is waiting for input when I start to chain&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 18:40:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251750#M15677</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2017-01-24T18:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to change name of results dynamically</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251751#M15678</link>
      <description>&lt;P&gt;Make sure that you are doing the tokening correctly.  Download this app and check out the examples:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/1603/"&gt;https://splunkbase.splunk.com/app/1603/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Check out the code for "Token Customization" examples.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 18:47:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-name-of-results-dynamically/m-p/251751#M15678</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-01-24T18:47:52Z</dc:date>
    </item>
  </channel>
</rss>

