<?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 Duplicate key  and the Inputfield in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Duplicate-key-and-the-Inputfield/m-p/288885#M706149</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or you can add the result of the function RowNo() as a field to your 'SmartPlain' table. This will ensure that every row is unique once it's loaded in and avoid the error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jun 2012 16:01:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-06-11T16:01:52Z</dc:date>
    <item>
      <title>Duplicate key  and the Inputfield</title>
      <link>https://community.qlik.com/t5/QlikView/Duplicate-key-and-the-Inputfield/m-p/288883#M706147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a table in my&amp;nbsp; application containing a long detailed sales history&amp;nbsp; data. &lt;/P&gt;&lt;P&gt;I use an inputfield to be able to simulate changes in profit by means o adjusting the GM%. &lt;/P&gt;&lt;P&gt;When I load the table in&amp;nbsp; older&amp;nbsp; QV&amp;nbsp; (v9) there is no issue. &lt;/P&gt;&lt;P&gt;I had to continue the development in a separate PC (out of server) with QV v.10 , &lt;/P&gt;&lt;P&gt;When I load the script , it ends with an error : &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Duplicate keys when loading&amp;nbsp; Input Field&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and the applicatiom re-starts &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This happend only in QV v.10.&lt;/P&gt;&lt;P&gt;When I delete the line with INPUTFIELD (load w/o the Inputfield),&amp;nbsp; the script runs OK in QV10 (but I cannot use inputsum of course)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) What does that error mean and why only in a newer QV?&lt;/P&gt;&lt;P&gt;2) how to find the root couse of the error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;original script:&lt;/P&gt;&lt;DIV&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/STRONG&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt; &lt;/EM&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;INPUTFIELD &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SmartPlain.GM_DELTA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SmartPlain:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;$(vDir)\EPS\SmartPlain.qvd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(qvd);&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2012 09:39:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Duplicate-key-and-the-Inputfield/m-p/288883#M706147</guid>
      <dc:creator>mszetyinszki</dc:creator>
      <dc:date>2012-02-16T09:39:20Z</dc:date>
    </item>
    <item>
      <title>Duplicate key  and the Inputfield</title>
      <link>https://community.qlik.com/t5/QlikView/Duplicate-key-and-the-Inputfield/m-p/288884#M706148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Internally, QlikView uses all the non-inputfield fields from the table to create a composite primary key for each inputfield value. (starting in QV10)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your error indicates that some records have the same combination of the non-inputfields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example a table A has the fields: X, Y, Z and W. W is declared as an Inputfield. The problem will occur if there are two or more records with the same combination of values for the fields X, Y and Z. This is because when you change one input value in field W, QlikView will not be able to correctly assign the value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So answering your questions:&lt;/P&gt;&lt;P&gt;1. This problem happens only in QV10 because inputfields functioned differently in QV9.&lt;/P&gt;&lt;P&gt;2. You need to ensure that there are no duplicate records in the non-inputfield fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope I was able to explain it clearly...&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2012 17:06:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Duplicate-key-and-the-Inputfield/m-p/288884#M706148</guid>
      <dc:creator>fosuzuki</dc:creator>
      <dc:date>2012-02-17T17:06:44Z</dc:date>
    </item>
    <item>
      <title>Duplicate key  and the Inputfield</title>
      <link>https://community.qlik.com/t5/QlikView/Duplicate-key-and-the-Inputfield/m-p/288885#M706149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or you can add the result of the function RowNo() as a field to your 'SmartPlain' table. This will ensure that every row is unique once it's loaded in and avoid the error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 16:01:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Duplicate-key-and-the-Inputfield/m-p/288885#M706149</guid>
      <dc:creator />
      <dc:date>2012-06-11T16:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate key  and the Inputfield</title>
      <link>https://community.qlik.com/t5/QlikView/Duplicate-key-and-the-Inputfield/m-p/288886#M706150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fantastic explanation that really helped me just now.&amp;nbsp; Thanks Fernando!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2014 15:03:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Duplicate-key-and-the-Inputfield/m-p/288886#M706150</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2014-02-07T15:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate key  and the Inputfield</title>
      <link>https://community.qlik.com/t5/QlikView/Duplicate-key-and-the-Inputfield/m-p/288887#M706151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fernando,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And what about my example? Could you please have a look to the attched qvw? !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 10:32:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Duplicate-key-and-the-Inputfield/m-p/288887#M706151</guid>
      <dc:creator />
      <dc:date>2014-07-17T10:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate key  and the Inputfield</title>
      <link>https://community.qlik.com/t5/QlikView/Duplicate-key-and-the-Inputfield/m-p/288888#M706152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eleni,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Conceptually your app has the same error. Since you only created one field which was declared as an inputfield, QlikView doesn't have a non-inputfield field to create a key. You must create another field with a unique number for each row.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 10:03:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Duplicate-key-and-the-Inputfield/m-p/288888#M706152</guid>
      <dc:creator>fosuzuki</dc:creator>
      <dc:date>2014-07-22T10:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate key  and the Inputfield</title>
      <link>https://community.qlik.com/t5/QlikView/Duplicate-key-and-the-Inputfield/m-p/288889#M706153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just in case,&lt;/P&gt;&lt;P&gt;I solved this problem by adding additional field with rowno()&lt;/P&gt;&lt;P&gt;RowNo() AS AddKey&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sergey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 09:16:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Duplicate-key-and-the-Inputfield/m-p/288889#M706153</guid>
      <dc:creator>SergeyMak</dc:creator>
      <dc:date>2014-07-29T09:16:31Z</dc:date>
    </item>
  </channel>
</rss>

