<?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 handle Input Box drop down when values have commas? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-handle-Input-Box-drop-down-when-values-have-commas/m-p/473542#M1148976</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a previous post Jeff Lancaster proposed a solution in case you want to have a drop-down menue in an input box and the values you are selecting from contain commas: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt; This is what I am using in the Constraints/Listed Values expression:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;='None Selected,' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Concat&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;DISTINCT&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Replace&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;primpract_res_name&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,',','_'),',')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;I also added 'None Selected' to the top of the list and forced a carriage-return after it, by including a comma.&amp;nbsp; Since the field that I am using actually has commas in the field values themselves, I had to replace the comma with an underscore ("_"), then swap them back at the time of use.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I implemented the replacement with the underscore (which is not ideal because it results in showing the underscores in the drop-down menue) and am faced with the re-replacement at time of use. I tried the following, but I can see that the editor does not recognise the replacement()-function as a function (it's not turned blue). I wondered what is wrong with the syntax and how I can correct it. (FYI, I use this expression in the Background colour expression for a grid chart to set the colour of the bubbles.) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13712300310598093" jivemacro_uid="_13712300310598093"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if([Var1]=Only({$&amp;lt;[Var2]={replace('$(Highlight)','_',',')}&amp;gt;} [Var1])&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ,lightblue()&lt;/P&gt;&amp;nbsp;&amp;nbsp; ,lightred())&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Highlight is the Variable set using the drop-down menue in the Input Box, Var2 is the field that Highlight is compared against to limit the selection. Var1 is the Dimension that determines the x-axis in the grid chart. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just correcting the code would be fine for me at this stage. Having a more elegant solution that allows to actually show comma values in the Input Box drop-down menue would be even better. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tony&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Jun 2013 17:23:45 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-06-14T17:23:45Z</dc:date>
    <item>
      <title>How to handle Input Box drop down when values have commas?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-handle-Input-Box-drop-down-when-values-have-commas/m-p/473542#M1148976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a previous post Jeff Lancaster proposed a solution in case you want to have a drop-down menue in an input box and the values you are selecting from contain commas: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt; This is what I am using in the Constraints/Listed Values expression:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;='None Selected,' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Concat&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;DISTINCT&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;Replace&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;primpract_res_name&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,',','_'),',')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;I also added 'None Selected' to the top of the list and forced a carriage-return after it, by including a comma.&amp;nbsp; Since the field that I am using actually has commas in the field values themselves, I had to replace the comma with an underscore ("_"), then swap them back at the time of use.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I implemented the replacement with the underscore (which is not ideal because it results in showing the underscores in the drop-down menue) and am faced with the re-replacement at time of use. I tried the following, but I can see that the editor does not recognise the replacement()-function as a function (it's not turned blue). I wondered what is wrong with the syntax and how I can correct it. (FYI, I use this expression in the Background colour expression for a grid chart to set the colour of the bubbles.) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13712300310598093" jivemacro_uid="_13712300310598093"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if([Var1]=Only({$&amp;lt;[Var2]={replace('$(Highlight)','_',',')}&amp;gt;} [Var1])&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ,lightblue()&lt;/P&gt;&amp;nbsp;&amp;nbsp; ,lightred())&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Highlight is the Variable set using the drop-down menue in the Input Box, Var2 is the field that Highlight is compared against to limit the selection. Var1 is the Dimension that determines the x-axis in the grid chart. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just correcting the code would be fine for me at this stage. Having a more elegant solution that allows to actually show comma values in the Input Box drop-down menue would be even better. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tony&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jun 2013 17:23:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-handle-Input-Box-drop-down-when-values-have-commas/m-p/473542#M1148976</guid>
      <dc:creator />
      <dc:date>2013-06-14T17:23:45Z</dc:date>
    </item>
  </channel>
</rss>

