<?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: Can I rename different fields the same thing? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-I-rename-different-fields-the-same-thing/m-p/702831#M238271</link>
    <description>&lt;P&gt;What if you have multiple that you want to rename the same?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| rename "Message.TaskInfo.CarHop Backup.LastResult"="-2147020576" AS Result
| rename "Message.TaskInfo.CarHop Backup.LastResult"=1 AS Result
| rename "Message.TaskInfo.CarHop Backup.LastResult"=0 AS Result
| rename "Message.TaskInfo.AI Restart Weekly.LastResult"=267011 AS Result
| rename "Message.TaskInfo.CarHop Backup.LastResult"=267009 AS Result
| rename "Message.TaskInfo.CarHop Backup.LastResult"=2 AS Result&lt;/LI-CODE&gt;
&lt;P&gt;This is not working for me&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Oct 2024 22:57:35 GMT</pubDate>
    <dc:creator>Robwhoa78</dc:creator>
    <dc:date>2024-10-25T22:57:35Z</dc:date>
    <item>
      <title>Can I rename different fields the same thing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-rename-different-fields-the-same-thing/m-p/143252#M39777</link>
      <description>&lt;P&gt;I'm working with a dataset that lists companies and individual people, so that some entries have the field "Entity Name" and some have "Individual Name". I'd like to output a table with both of these fields shown under a single "Name" field. When I try to rename them both by this title, though, the second command overwrites the first one. Is there a way to have both fields listed under the same title, while keeping them as separate events?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2015 11:15:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-rename-different-fields-the-same-thing/m-p/143252#M39777</guid>
      <dc:creator>Federica_92</dc:creator>
      <dc:date>2015-04-14T11:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Can I rename different fields the same thing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-rename-different-fields-the-same-thing/m-p/143253#M39778</link>
      <description>&lt;P&gt;I often use coalesce in these cases; hopefully it will work in yours.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval name = coalesce(entityName, individualName) | ... 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This assumes every event will have either one or the other field. Otherwise I think if it has both it will grab the fields in the order listed. I often use that for especially Windows logs where the field used might be different for the same type of event based on OS version or specific event ID.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2015 11:19:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-rename-different-fields-the-same-thing/m-p/143253#M39778</guid>
      <dc:creator>Runals</dc:creator>
      <dc:date>2015-04-14T11:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can I rename different fields the same thing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-rename-different-fields-the-same-thing/m-p/143254#M39779</link>
      <description>&lt;P&gt;Another way to do it might be something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval name = if(isnotnull(entityName), entityName, individualName) | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Apr 2015 11:21:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-rename-different-fields-the-same-thing/m-p/143254#M39779</guid>
      <dc:creator>Runals</dc:creator>
      <dc:date>2015-04-14T11:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can I rename different fields the same thing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-rename-different-fields-the-same-thing/m-p/143255#M39780</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...|rename "Entity Name"  as EntityName| rename "Individual Name"  as IndividualName |eval name=EntityName  +  IndividualName |...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Apr 2015 11:32:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-rename-different-fields-the-same-thing/m-p/143255#M39780</guid>
      <dc:creator>NOUMSSI</dc:creator>
      <dc:date>2015-04-14T11:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can I rename different fields the same thing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-rename-different-fields-the-same-thing/m-p/143256#M39781</link>
      <description>&lt;P&gt;u can try like this:&lt;BR /&gt;
    ... |rename entityName as Name  |eval  Name ="companie name:" + Name + "and people name:" +  individualName | ...&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2015 11:55:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-rename-different-fields-the-same-thing/m-p/143256#M39781</guid>
      <dc:creator>fdi01</dc:creator>
      <dc:date>2015-04-14T11:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can I rename different fields the same thing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-rename-different-fields-the-same-thing/m-p/143257#M39782</link>
      <description>&lt;P&gt;Hi Federica_92,&lt;/P&gt;

&lt;P&gt;I the following can solve your problem:&lt;/P&gt;

&lt;P&gt;.........|eval SingleName=mvzip(entityName, individualName)| makemv delim="," SingleName|mvexpand SingleName&lt;/P&gt;

&lt;P&gt;For Example if you want to have both host and soure in the same field call SingleName :&lt;/P&gt;

&lt;P&gt;index=*|table host source|eval SingleName=mvzip(host,source)| makemv delim="," SingleName|mvexpand SingleName&lt;/P&gt;

&lt;P&gt;I hope you will be satisfied.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2015 12:14:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-rename-different-fields-the-same-thing/m-p/143257#M39782</guid>
      <dc:creator>stephane_cyrill</dc:creator>
      <dc:date>2015-04-14T12:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Can I rename different fields the same thing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-rename-different-fields-the-same-thing/m-p/702831#M238271</link>
      <description>&lt;P&gt;What if you have multiple that you want to rename the same?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| rename "Message.TaskInfo.CarHop Backup.LastResult"="-2147020576" AS Result
| rename "Message.TaskInfo.CarHop Backup.LastResult"=1 AS Result
| rename "Message.TaskInfo.CarHop Backup.LastResult"=0 AS Result
| rename "Message.TaskInfo.AI Restart Weekly.LastResult"=267011 AS Result
| rename "Message.TaskInfo.CarHop Backup.LastResult"=267009 AS Result
| rename "Message.TaskInfo.CarHop Backup.LastResult"=2 AS Result&lt;/LI-CODE&gt;
&lt;P&gt;This is not working for me&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 22:57:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-rename-different-fields-the-same-thing/m-p/702831#M238271</guid>
      <dc:creator>Robwhoa78</dc:creator>
      <dc:date>2024-10-25T22:57:35Z</dc:date>
    </item>
  </channel>
</rss>

