<?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: Replace Function for Color Variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Replace-Function-for-Color-Variable/m-p/905730#M314792</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll try explain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a variable called $(color.bars), I have buttons that change the color of the bars, basically changing &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(a),&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(r),&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(g),&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(b) variables&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have another variable called $(color.ribbon) which I have an option to change the bars to the same color as the ribbon, however the ribbon is ARGB(255,100,100,150) which means when I select to color of the bars to change to the same color as the ribbon, it changes the $(color.bars) variable from ARGB($(a),$(r),$(g),$(b)) to &lt;SPAN style="font-size: 13.3333330154419px;"&gt;ARGB(255,100,100,150)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this means my other buttons will no longer works as they are changing the &lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(a),&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(r),&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(g),&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(b) variables which don't exists&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted a quick way to change it back so my other buttons work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have it working now so..........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your responses&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 26 Apr 2015 14:42:32 GMT</pubDate>
    <dc:creator>rustyfishbones</dc:creator>
    <dc:date>2015-04-26T14:42:32Z</dc:date>
    <item>
      <title>Replace Function for Color Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-Function-for-Color-Variable/m-p/905724#M314786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following color Function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARGB(255,100,100,150)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to replace the numbers with variables for a select in field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a color variable called $(color.bars)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried using the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBFIELD(TextBetween($(color.bars),'(',')'),',',1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which returns 255&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I want to replace 255 with a variable $(a.bar)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=REPLACE(CHR(39)&amp;amp;TEXT(SUBFIELD(TextBetween($(color.bars),'(',')'),',',1))&amp;amp;CHR(39),'$(a.bar)')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but that does not work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ant Ideas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 13:54:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-Function-for-Color-Variable/m-p/905724#M314786</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2015-04-26T13:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Function for Color Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-Function-for-Color-Variable/m-p/905725#M314787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alan,&lt;/P&gt;&lt;P&gt;My impression is that you want to achieve something simple using a rather complex steps.&amp;nbsp; If I got what you want (?), why don't you use&lt;/P&gt;&lt;P&gt;ARGB(VarName,100,100,150)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 14:08:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-Function-for-Color-Variable/m-p/905725#M314787</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-26T14:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Function for Color Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-Function-for-Color-Variable/m-p/905726#M314788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes you are correct, I have it working a more simple way, good spot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I was wondering if it could be done using replace &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so I want to replace&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARGB(255,100,100,150) with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARGB($(a),$(r),$(g),$(b))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it's more wanting to know if I can do it, rather than needing it right now!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 14:16:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-Function-for-Color-Variable/m-p/905726#M314788</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2015-04-26T14:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Function for Color Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-Function-for-Color-Variable/m-p/905727#M314789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my case&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARGB(255,100,100,150) is in a variable called $(color.bars)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 14:18:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-Function-for-Color-Variable/m-p/905727#M314789</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2015-04-26T14:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Function for Color Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-Function-for-Color-Variable/m-p/905728#M314790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this works, I think I was over thinking it &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE($(color.bars),'$(color.bars)','ARGB($(a),$(r),$(g),$(b))')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 14:21:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-Function-for-Color-Variable/m-p/905728#M314790</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2015-04-26T14:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Function for Color Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-Function-for-Color-Variable/m-p/905729#M314791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I still don't get it...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;P&gt;If you want your function to be flexible, just use&lt;/P&gt;&lt;P&gt;ARGB(VarA, VarR, VarG, VarB)&lt;/P&gt;&lt;P&gt;And, define all these vars as any other variables, in input box, or in the script or in variable overview.&amp;nbsp; Function replace() is&amp;nbsp; a string function, and it makes sense in this content only&lt;STRONG&gt; if you load your argb() function from some source as a string&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;ColorFunction&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // the value of this field is 'argb(255,100,100,150)'&lt;/P&gt;&lt;P&gt;FROM...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 14:26:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-Function-for-Color-Variable/m-p/905729#M314791</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-26T14:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Function for Color Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-Function-for-Color-Variable/m-p/905730#M314792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll try explain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a variable called $(color.bars), I have buttons that change the color of the bars, basically changing &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(a),&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(r),&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(g),&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(b) variables&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have another variable called $(color.ribbon) which I have an option to change the bars to the same color as the ribbon, however the ribbon is ARGB(255,100,100,150) which means when I select to color of the bars to change to the same color as the ribbon, it changes the $(color.bars) variable from ARGB($(a),$(r),$(g),$(b)) to &lt;SPAN style="font-size: 13.3333330154419px;"&gt;ARGB(255,100,100,150)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this means my other buttons will no longer works as they are changing the &lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(a),&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(r),&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(g),&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(b) variables which don't exists&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted a quick way to change it back so my other buttons work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have it working now so..........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your responses&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 14:42:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-Function-for-Color-Variable/m-p/905730#M314792</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2015-04-26T14:42:32Z</dc:date>
    </item>
  </channel>
</rss>

