<?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: GetPossibleValues sometimes returns wrong value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/GetPossibleValues-sometimes-returns-wrong-value/m-p/386225#M699123</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have now created a ticket in QFORCE, it will most likely take some time for them to respond as this topic is not covered by the Support &amp;amp; Maintenance agreement. Hopefully they will understand the huge impact this has once they start looking into the case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have done some more investigation but havn't found a solution yet. The good thing is that i was able to reproduce the issue so I had something to send to QT.&lt;/P&gt;&lt;P&gt;It is not the getPossibleValues that fails, its actually the Select statement. I have included both Sleep and WaitForIdle without any change. Even a sleep 10000 did the trick. As of now the I have some code to check that only one value is selected and if not a have a do while loop that redo the selection up to 5 times. After 5 times the application quits. Most often the macro will work upon next execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Post will be updated once i receive answers from QT Support.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Feb 2013 09:51:54 GMT</pubDate>
    <dc:creator>blaise</dc:creator>
    <dc:date>2013-02-18T09:51:54Z</dc:date>
    <item>
      <title>GetPossibleValues sometimes returns wrong value</title>
      <link>https://community.qlik.com/t5/QlikView/GetPossibleValues-sometimes-returns-wrong-value/m-p/386219#M699117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Qv'ers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with one of my applications that creates a pdf report and send the pdf to an email address included in the datamodel. I loop over 3 fields and lock the values before i create and send the pdf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop 1 = plant&lt;/P&gt;&lt;P&gt;Loop 2 = route&lt;/P&gt;&lt;P&gt;Loop 3 = driver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the getPossibleValues.Item(0).Text function to put the email address in a vb variable - the last loop field (driver) has only one value in the email address field so I don't need to do a loop over the possible values. 99% of the times this works like a charm, but for some very strange reason 1% of the times the email address fetched is incorrect. The GetPossibleValues.Item(0).Text returns a totaly different value that the one (and only) existing value in the email address field.Before i set the vb variable to use for the email function i also clear the vb variable to be sure that there is no "left overs" from the previous looped fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the incorrect email is fetched, its very often the same driver (about 80% of the times).&lt;/P&gt;&lt;P&gt;I have checked the QVD and the email address is always correct (and only one value exists) and I cannot find a pattern to which incorrect value Qv chose to fetch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone encountered the same issue?&lt;/P&gt;&lt;P&gt;In short, my script looks like this;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i = 0 to Plant.Count - 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select and lock Plant Value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for j = 0 to Route.Count - 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select and lock Route Value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for k = 0 to Driver.Count - 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select and lock Driver Value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create PDF&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GetPossibleValues.Item(0).Text on email address field&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; send PDF&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clear and unlcok Driver Value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; next Driver&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clear and unlock Route value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; next Route&lt;/P&gt;&lt;P&gt;clear and unlock Plant Value&lt;/P&gt;&lt;P&gt;next Plant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jan 2013 10:21:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetPossibleValues-sometimes-returns-wrong-value/m-p/386219#M699117</guid>
      <dc:creator>blaise</dc:creator>
      <dc:date>2013-01-02T10:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: GetPossibleValues sometimes returns wrong value</title>
      <link>https://community.qlik.com/t5/QlikView/GetPossibleValues-sometimes-returns-wrong-value/m-p/386220#M699118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Blaise,&lt;/P&gt;&lt;P&gt;I am facing the same issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have some code that worked flawlessly when performing a similar email lookup to email a PDF in QV10.&amp;nbsp; It seems that after migrating to QV11, we began facing this issue of the incorrect email being returned periodically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you ever figure out a solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Wade&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 15:46:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetPossibleValues-sometimes-returns-wrong-value/m-p/386220#M699118</guid>
      <dc:creator>wadestiell</dc:creator>
      <dc:date>2013-01-24T15:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: GetPossibleValues sometimes returns wrong value</title>
      <link>https://community.qlik.com/t5/QlikView/GetPossibleValues-sometimes-returns-wrong-value/m-p/386221#M699119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I actually found the issue a few days ago. It wasn't the GetPossibleValues function that wasn't working, it was the the select statement i had before. I've added some code a few weeks ago to be able to narrow down the issue by running the GetPossibleValues in a loop, and if the value were incorrect (i loaded the email values in two fields and compared those two) after 5 tries (with a sleep of 2sec between) I saved the application under a different name.&lt;/P&gt;&lt;P&gt;With this i could open up the application with the exact same selection state when the wrong email was fetched. In here i could see that QlikView had selected all my dimension values that started with the number 2, instead of just selecting number 2. And when about 8 dimension values was selected, the GetPossibleValues.Item(0).Text would of course most likely fetch the "wrong" address.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Havn't had time to find a solution or file a support ticket to QT Support but will follow up in this thread as progress goes on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just send me a pm if you want me to share the code with you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 22:38:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetPossibleValues-sometimes-returns-wrong-value/m-p/386221#M699119</guid>
      <dc:creator>blaise</dc:creator>
      <dc:date>2013-01-24T22:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: GetPossibleValues sometimes returns wrong value</title>
      <link>https://community.qlik.com/t5/QlikView/GetPossibleValues-sometimes-returns-wrong-value/m-p/386222#M699120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't tell from your psedo code what may be wrong with the select, but it's a good idea to call Application.WaitForIdle between user actions like select and lock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 04:38:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetPossibleValues-sometimes-returns-wrong-value/m-p/386222#M699120</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2013-01-25T04:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: GetPossibleValues sometimes returns wrong value</title>
      <link>https://community.qlik.com/t5/QlikView/GetPossibleValues-sometimes-returns-wrong-value/m-p/386223#M699121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yea, I had both the Wait4Idle and Sleep before my getPossibleValues, but when i started the error findings i also included a lock after the select, will include a Wait and Sleep between the select and lock.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 08:27:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetPossibleValues-sometimes-returns-wrong-value/m-p/386223#M699121</guid>
      <dc:creator>blaise</dc:creator>
      <dc:date>2013-01-25T08:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: GetPossibleValues sometimes returns wrong value</title>
      <link>https://community.qlik.com/t5/QlikView/GetPossibleValues-sometimes-returns-wrong-value/m-p/386224#M699122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did somehow get this to work yesterday by making a few code changes (adding some additional selections).&amp;nbsp; But perhaps the additional selections just added enough of a delay to allow the selection to complete.&amp;nbsp; I will try using the WaitForIdle after selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Wade&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 14:16:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetPossibleValues-sometimes-returns-wrong-value/m-p/386224#M699122</guid>
      <dc:creator>wadestiell</dc:creator>
      <dc:date>2013-01-25T14:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: GetPossibleValues sometimes returns wrong value</title>
      <link>https://community.qlik.com/t5/QlikView/GetPossibleValues-sometimes-returns-wrong-value/m-p/386225#M699123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have now created a ticket in QFORCE, it will most likely take some time for them to respond as this topic is not covered by the Support &amp;amp; Maintenance agreement. Hopefully they will understand the huge impact this has once they start looking into the case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have done some more investigation but havn't found a solution yet. The good thing is that i was able to reproduce the issue so I had something to send to QT.&lt;/P&gt;&lt;P&gt;It is not the getPossibleValues that fails, its actually the Select statement. I have included both Sleep and WaitForIdle without any change. Even a sleep 10000 did the trick. As of now the I have some code to check that only one value is selected and if not a have a do while loop that redo the selection up to 5 times. After 5 times the application quits. Most often the macro will work upon next execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Post will be updated once i receive answers from QT Support.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 09:51:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetPossibleValues-sometimes-returns-wrong-value/m-p/386225#M699123</guid>
      <dc:creator>blaise</dc:creator>
      <dc:date>2013-02-18T09:51:54Z</dc:date>
    </item>
  </channel>
</rss>

