<?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 replace dynamic field values? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-replace-dynamic-field-values/m-p/122286#M7162</link>
    <description>&lt;P&gt;Thank you, but the above query trims every field even if it does not contain values(), any other suggestion?&lt;/P&gt;</description>
    <pubDate>Tue, 03 Feb 2015 18:51:36 GMT</pubDate>
    <dc:creator>kallisrayar1986</dc:creator>
    <dc:date>2015-02-03T18:51:36Z</dc:date>
    <item>
      <title>How to replace dynamic field values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-replace-dynamic-field-values/m-p/122284#M7160</link>
      <description>&lt;P&gt;I have a field (Details) with the below values  which is an output of stats command:&lt;/P&gt;

&lt;P&gt;Details:&lt;/P&gt;

&lt;P&gt;values(XXX)&lt;BR /&gt;
values(YYY)&lt;/P&gt;

&lt;P&gt;i want to replace the above with XXX and YYY, basically i want to trim values( and ).&lt;/P&gt;

&lt;P&gt;If i try "replace values(XXX) with XXX in Details" it works fine but the XXX and YYY will be keep changing based on my search and it is going to be dynamic. &lt;/P&gt;

&lt;P&gt;Please help. &lt;/P&gt;</description>
      <pubDate>Thu, 29 Jan 2015 19:12:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-replace-dynamic-field-values/m-p/122284#M7160</guid>
      <dc:creator>kallisrayar1986</dc:creator>
      <dc:date>2015-01-29T19:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace dynamic field values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-replace-dynamic-field-values/m-p/122285#M7161</link>
      <description>&lt;P&gt;If I understood the question correctly, you can use eval trim to remove the static characters.&lt;BR /&gt;
so that would be&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your query here | eval Details=trim(Details,"values(") | eval Details=trim(Details,")")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Feb 2015 02:25:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-replace-dynamic-field-values/m-p/122285#M7161</guid>
      <dc:creator>ramdaspr</dc:creator>
      <dc:date>2015-02-03T02:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace dynamic field values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-replace-dynamic-field-values/m-p/122286#M7162</link>
      <description>&lt;P&gt;Thank you, but the above query trims every field even if it does not contain values(), any other suggestion?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Feb 2015 18:51:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-replace-dynamic-field-values/m-p/122286#M7162</guid>
      <dc:creator>kallisrayar1986</dc:creator>
      <dc:date>2015-02-03T18:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace dynamic field values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-replace-dynamic-field-values/m-p/122287#M7163</link>
      <description>&lt;P&gt;Can you provide a sizable sample of what your data column looks like? &lt;BR /&gt;
The trim command should ideally work only if a match is present so I am not sure what dataset its processing which is causing this issue.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Feb 2015 23:27:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-replace-dynamic-field-values/m-p/122287#M7163</guid>
      <dc:creator>ramdaspr</dc:creator>
      <dc:date>2015-02-03T23:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace dynamic field values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-replace-dynamic-field-values/m-p/122288#M7164</link>
      <description>&lt;P&gt;It is a tranpose results set, the column name is Details: the values are as follows - &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Details&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;test_id&lt;BR /&gt;
iter&lt;BR /&gt;
appver&lt;BR /&gt;
Scenario&lt;BR /&gt;
Version&lt;BR /&gt;
requests_count_total&lt;BR /&gt;
values(aaa)&lt;BR /&gt;
values(bbb)&lt;BR /&gt;
values(ccc)&lt;BR /&gt;
values(ddd)&lt;BR /&gt;
values(eee)&lt;BR /&gt;
values(fff)&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:50:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-replace-dynamic-field-values/m-p/122288#M7164</guid>
      <dc:creator>kallisrayar1986</dc:creator>
      <dc:date>2020-09-28T18:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace dynamic field values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-replace-dynamic-field-values/m-p/122289#M7165</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;... | rex field=Details mode=sed "s/^values\(//" | rex field=Details mode=sed "s/\)$//"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Lets see if rex does it this time. I tried it locally with single strings and it seems to work ok.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2015 01:50:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-replace-dynamic-field-values/m-p/122289#M7165</guid>
      <dc:creator>ramdaspr</dc:creator>
      <dc:date>2015-02-04T01:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace dynamic field values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-replace-dynamic-field-values/m-p/122290#M7166</link>
      <description>&lt;P&gt;hi, it worked fine this time.. thank you..!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2015 19:59:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-replace-dynamic-field-values/m-p/122290#M7166</guid>
      <dc:creator>kallisrayar1986</dc:creator>
      <dc:date>2015-02-04T19:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace dynamic field values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-replace-dynamic-field-values/m-p/122291#M7167</link>
      <description>&lt;P&gt;No worries. But you  have to note that it isnt the perfect solution either since it will replace any field value which has a ")" at the end even if it doesnt start with "values(".&lt;/P&gt;

&lt;P&gt;Unfortunately my regex skills are lacking so you might want to check if there is a better regex option.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2015 01:32:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-replace-dynamic-field-values/m-p/122291#M7167</guid>
      <dc:creator>ramdaspr</dc:creator>
      <dc:date>2015-02-05T01:32:21Z</dc:date>
    </item>
  </channel>
</rss>

