<?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 My CollorPallete expression is not working when using LIKE in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/My-CollorPallete-expression-is-not-working-when-using-LIKE/m-p/562716#M46318</link>
    <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;When using a CollorPallete expression on a statistics table the following code works:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;format type="color" field="myField"&amp;gt;
    &amp;lt;colorPalette type="expression"&amp;gt;if (value == "DEBUG", "#f54242","#65A637") 
    &amp;lt;/colorPalette&amp;gt;
&amp;lt;/format&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;#F54242 = RED&lt;/P&gt;&lt;P&gt;#65A637 = GREEN&lt;/P&gt;&lt;P&gt;Because the data in myField is not exactly "DEBUG" , the table collumns are all green.&amp;nbsp; So in order to make the collumns with "DEBUG" red and the rest green, I tried the following piece of code:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;format type="color" field="myField"&amp;gt;
    &amp;lt;colorPalette type="expression"&amp;gt;if (like(value,"%DEBUG%", "#f54242","#65A637")
    &amp;lt;/colorPalette&amp;gt;
&amp;lt;/format&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This piece of code is not working at all. I am trying to use the wildcard to find any occurance of "DEBUG" inside &lt;STRONG&gt;myField&lt;/STRONG&gt;. Not only are the fields not red, they are not even green, making me think my code is incorrect.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 10 Aug 2021 09:36:41 GMT</pubDate>
    <dc:creator>Bleepie</dc:creator>
    <dc:date>2021-08-10T09:36:41Z</dc:date>
    <item>
      <title>My CollorPallete expression is not working when using LIKE</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/My-CollorPallete-expression-is-not-working-when-using-LIKE/m-p/562716#M46318</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;When using a CollorPallete expression on a statistics table the following code works:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;format type="color" field="myField"&amp;gt;
    &amp;lt;colorPalette type="expression"&amp;gt;if (value == "DEBUG", "#f54242","#65A637") 
    &amp;lt;/colorPalette&amp;gt;
&amp;lt;/format&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;#F54242 = RED&lt;/P&gt;&lt;P&gt;#65A637 = GREEN&lt;/P&gt;&lt;P&gt;Because the data in myField is not exactly "DEBUG" , the table collumns are all green.&amp;nbsp; So in order to make the collumns with "DEBUG" red and the rest green, I tried the following piece of code:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;format type="color" field="myField"&amp;gt;
    &amp;lt;colorPalette type="expression"&amp;gt;if (like(value,"%DEBUG%", "#f54242","#65A637")
    &amp;lt;/colorPalette&amp;gt;
&amp;lt;/format&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This piece of code is not working at all. I am trying to use the wildcard to find any occurance of "DEBUG" inside &lt;STRONG&gt;myField&lt;/STRONG&gt;. Not only are the fields not red, they are not even green, making me think my code is incorrect.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 09:36:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/My-CollorPallete-expression-is-not-working-when-using-LIKE/m-p/562716#M46318</guid>
      <dc:creator>Bleepie</dc:creator>
      <dc:date>2021-08-10T09:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: My CollorPallete expression is not working when using LIKE</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/My-CollorPallete-expression-is-not-working-when-using-LIKE/m-p/562718#M46319</link>
      <description>&lt;P&gt;You need to close the brackets of the like function&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if (like(value,"%DEBUG%"), "#f54242","#65A637")&lt;/LI-CODE&gt;&lt;P&gt;If that doesn't work, try the match function.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 10:04:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/My-CollorPallete-expression-is-not-working-when-using-LIKE/m-p/562718#M46319</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-08-10T10:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: My CollorPallete expression is not working when using LIKE</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/My-CollorPallete-expression-is-not-working-when-using-LIKE/m-p/562720#M46320</link>
      <description>&lt;P&gt;Whoops. Small mistake. Got it working. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 10:11:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/My-CollorPallete-expression-is-not-working-when-using-LIKE/m-p/562720#M46320</guid>
      <dc:creator>Bleepie</dc:creator>
      <dc:date>2021-08-10T10:11:42Z</dc:date>
    </item>
  </channel>
</rss>

