<?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 GetPossibleValues (Dynamic Update) bug description and workaround in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/GetPossibleValues-Dynamic-Update-bug-description-and-workaround/m-p/168722#M39785</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There appears to be a bug pertaining to GetPossibleValues which manifests itself through the dynamic update feature (DynamicUpdateCommand).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is how to reproduce the bug:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;/LI&gt;&lt;LI&gt;Create a two column data island table T1 (F1, F2)&lt;/LI&gt;&lt;LI&gt;DELETE a value from this table using DynamicUpdateCommand&lt;/LI&gt;&lt;LI&gt;Make a selection on two or more values in F1&lt;/LI&gt;&lt;LI&gt;In VBScript execute GetPossibleValues&lt;/LI&gt;&lt;LI&gt;Loop through all values and concat values into a single string&lt;/LI&gt;&lt;LI&gt;You will notice that the last possible value is never returned&lt;/LI&gt;&lt;/OL&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two ways to workaround this bug, depending on the scenario.&lt;/P&gt;&lt;P&gt;Scenario 1: You wish to use the possible values to restrict data within a chart (e.g. you are constructing a set expression, based on the possible values, and using the set exprssion in a chart).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the scenario the workaround would be to instead use the P() function in your set expression to directly select these values. E.g. "{&amp;lt;F1=,F2=P(F2)&amp;gt;}"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scenario 2: You will to take the list of possible values and submit them to another function (e.g. a stored procedure)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case you can use the Evaluate QlikView function to return the list. For example if you wanted to create a concated list of possible values with a pipe delimiter, the following VBScript would return this concatenated list:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;ActiveDocument.Evaluate("Concat(distinct DPROF_description, '|')")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Hopefully at some point QlikView will be able to resolve this issue, since GetPossibleValues is much easier way to retrieve these values than through the Evaluate function.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Aug 2010 20:00:26 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-08-19T20:00:26Z</dc:date>
    <item>
      <title>GetPossibleValues (Dynamic Update) bug description and workaround</title>
      <link>https://community.qlik.com/t5/QlikView/GetPossibleValues-Dynamic-Update-bug-description-and-workaround/m-p/168722#M39785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There appears to be a bug pertaining to GetPossibleValues which manifests itself through the dynamic update feature (DynamicUpdateCommand).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is how to reproduce the bug:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;/LI&gt;&lt;LI&gt;Create a two column data island table T1 (F1, F2)&lt;/LI&gt;&lt;LI&gt;DELETE a value from this table using DynamicUpdateCommand&lt;/LI&gt;&lt;LI&gt;Make a selection on two or more values in F1&lt;/LI&gt;&lt;LI&gt;In VBScript execute GetPossibleValues&lt;/LI&gt;&lt;LI&gt;Loop through all values and concat values into a single string&lt;/LI&gt;&lt;LI&gt;You will notice that the last possible value is never returned&lt;/LI&gt;&lt;/OL&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two ways to workaround this bug, depending on the scenario.&lt;/P&gt;&lt;P&gt;Scenario 1: You wish to use the possible values to restrict data within a chart (e.g. you are constructing a set expression, based on the possible values, and using the set exprssion in a chart).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the scenario the workaround would be to instead use the P() function in your set expression to directly select these values. E.g. "{&amp;lt;F1=,F2=P(F2)&amp;gt;}"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scenario 2: You will to take the list of possible values and submit them to another function (e.g. a stored procedure)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case you can use the Evaluate QlikView function to return the list. For example if you wanted to create a concated list of possible values with a pipe delimiter, the following VBScript would return this concatenated list:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;ActiveDocument.Evaluate("Concat(distinct DPROF_description, '|')")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Hopefully at some point QlikView will be able to resolve this issue, since GetPossibleValues is much easier way to retrieve these values than through the Evaluate function.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 20:00:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetPossibleValues-Dynamic-Update-bug-description-and-workaround/m-p/168722#M39785</guid>
      <dc:creator />
      <dc:date>2010-08-19T20:00:26Z</dc:date>
    </item>
  </channel>
</rss>

