<?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 How to format fields globally based on the data type used? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-format-fields-globally-based-on-the-data-type-used/m-p/116655#M30992</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;Is there any way by which I can set the formatting at once central place and it takes effect wherever that data type is used. For example, I define types like US_CURRENCY, NUMBER_WITH_COMMAS, etc...and then in query  I can simply mark the field to be US_CURRENCY so that it is represented as $389.90 instead of 380.90 &lt;/P&gt;

&lt;P&gt;Any pointers would be appreciated&lt;/P&gt;

&lt;P&gt;thanks, ronak&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 19:21:04 GMT</pubDate>
    <dc:creator>ronak</dc:creator>
    <dc:date>2020-09-28T19:21:04Z</dc:date>
    <item>
      <title>How to format fields globally based on the data type used?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-format-fields-globally-based-on-the-data-type-used/m-p/116655#M30992</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;Is there any way by which I can set the formatting at once central place and it takes effect wherever that data type is used. For example, I define types like US_CURRENCY, NUMBER_WITH_COMMAS, etc...and then in query  I can simply mark the field to be US_CURRENCY so that it is represented as $389.90 instead of 380.90 &lt;/P&gt;

&lt;P&gt;Any pointers would be appreciated&lt;/P&gt;

&lt;P&gt;thanks, ronak&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:21:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-format-fields-globally-based-on-the-data-type-used/m-p/116655#M30992</guid>
      <dc:creator>ronak</dc:creator>
      <dc:date>2020-09-28T19:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to format fields globally based on the data type used?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-format-fields-globally-based-on-the-data-type-used/m-p/116656#M30993</link>
      <description>&lt;P&gt;You could create a macro &lt;CODE&gt;US_CURRENCY(1)&lt;/CODE&gt; that takes the field as its argument and is defined something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;fieldformat $field$ = "$$".'$field$'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and use it in your searches like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;some search | `US_CURRENCY(total)` | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Mar 2015 23:23:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-format-fields-globally-based-on-the-data-type-used/m-p/116656#M30993</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2015-03-26T23:23:08Z</dc:date>
    </item>
  </channel>
</rss>

