<?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: Add RowNo() to avoid Duplicate key on inputfield in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Add-RowNo-to-avoid-Duplicate-key-on-inputfield/m-p/573972#M1104208</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;This is the solution that someone wrote and wich I'm trying to implement in my load script, hopefuly this makes more sense than my code above.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To help identify the problem, add a row number field to each row in the QlikView table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will give you at least one field that is unique on each of the duplicate rows. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do this without reloading the entire document. Here's an example-- First, save a backup copy of the report that you are working on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume that the table to which you want to add a row number is named REDFLIGHTS. Add these rows to the top of your loadscript:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REDFLIGHTS_X:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add Load RowNo() as REDFLIGHTS_RowNo, * Resident REDFLIGHTS;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table REDFLIGHTS;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rename Table REDFLIGHTS_X to REDFLIGHTS;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exit Script;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, from the menu, select File-&amp;gt;Partial Reload This will run the five lines you added to your loadscript and it will build a new table inside the document &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is identical to your original table but with a rownumber field, REDFLIGHTS_RowNo, added to the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, in a tablebox that includes the rownumber field or in a chart using the key fields as dimensions and using a count(REDFLIGHTS_RowNo) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;expression you will be able to identify the duplicate rows in the table. At that point you will have to figure out how to eliminate or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;handle the duplicate rows when data is loaded. Remember to remove the five lines from the top of your loadscript before you next try to reload data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*/ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Mar 2014 11:38:54 GMT</pubDate>
    <dc:creator>amber2000</dc:creator>
    <dc:date>2014-03-28T11:38:54Z</dc:date>
    <item>
      <title>Add RowNo() to avoid Duplicate key on inputfield</title>
      <link>https://community.qlik.com/t5/QlikView/Add-RowNo-to-avoid-Duplicate-key-on-inputfield/m-p/573969#M1104205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm inserting a few inputfields in my QVW.&lt;/P&gt;&lt;P&gt;The moment I do a reload i'm getting the error of Duplicate Key, I've searched this forum and someone came up with the solution&lt;/P&gt;&lt;P&gt;to add&amp;nbsp; a RowNo() result that makes the records unique.&lt;/P&gt;&lt;P&gt;So I'm trying to implement this suggestion but it failes miserabaly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me to sort this out&amp;nbsp; please?????? If I use the funtion RowNo() an error apears:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Table not found&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Palletcontrole:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Add Load RowNo() AS RecordNbr_RowNo,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;* Resident&amp;nbsp; RecordNbr&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;INPUTFIELD &lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;To_Give&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Given&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Remarques&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt;&lt;BR /&gt;Palletcontrole:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Add&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RowNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;() &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;RecordNbr_RowNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;* &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; RecordNbr;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Drop&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; RecordNbr;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Rename&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Palletcontrole &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; RecordNbr;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Exit&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;script&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; *,&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DayStart&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Assignment_Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date_Picking]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Assignment_Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date_Picking Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Assignment_Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date_Picking Month]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Week&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Assignment_Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date_Picking Week]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;WeekDay&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Assignment_Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date_Picking Day]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Monthstart&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Assignment_Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),'MM-YYYY') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Date_Picking MonthYear]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[DT_Start_Dates]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'YYYYMMDD') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Assignment_Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[FK_Employee]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[SD_Employee_Id]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[FK_Shop]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[SD_Customer_Id]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[FK_Article]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[SD_Article_Id]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[FK_Aisle]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[SD_Aisle_Id]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[BK_Pallet_Cd]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[SD_Pallet]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[BK_Assignment_Cd]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[SD_Assignment]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[M_Nr_of_Colli]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[SD_Colli]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;To_Give&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Given&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Remarques&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; SELECT [DT_Start_Dates],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [FK_Employee],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [FK_Shop],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [FK_Article],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [FK_Aisle],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [BK_Pallet_Cd],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [BK_Assignment_Cd],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; W.[BK_Shop_Cd],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; W.[BK_Shop_Cd],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A.[BK_Article_Cd],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A.[Article_Desc],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A.[Location_Org],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A.[LogisticalFlow],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A.[FlowType],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Emp.[BK_Employee],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Emp.[Name] + Emp.[FirstName],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [M_Nr_of_Colli] &lt;BR /&gt;FROM DWH.dbo."F_Productivity_Colli"&lt;BR /&gt;&lt;BR /&gt;INNER JOIN DWH.dbo."D_Employee" Emp ON [FK_Employee] = Emp.[SK_Employee]&lt;BR /&gt;INNER JOIN DWH.dbo."D_Shop" W ON [FK_Shop] = W.[SK_Shop]&lt;BR /&gt;INNER JOIN DWH.dbo."D_Article" A ON [FK_Article] = A.[SK_Article]&lt;BR /&gt;INNER JOIN DWH.dbo."D_Aisle" Ail ON [FK_Aisle] = Ail.[SK_Aisle]; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Monique&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 10:26:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-RowNo-to-avoid-Duplicate-key-on-inputfield/m-p/573969#M1104205</guid>
      <dc:creator>amber2000</dc:creator>
      <dc:date>2014-03-28T10:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Add RowNo() to avoid Duplicate key on inputfield</title>
      <link>https://community.qlik.com/t5/QlikView/Add-RowNo-to-avoid-Duplicate-key-on-inputfield/m-p/573970#M1104206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's hard to debug the code just by reading it... apparently there's nothing wrong with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just one question out of curiosity, why the resident load?. Why not just add the &lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;RowNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;() &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;RecordNbr_RowNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,&lt;/SPAN&gt; on the original table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 10:35:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-RowNo-to-avoid-Duplicate-key-on-inputfield/m-p/573970#M1104206</guid>
      <dc:creator>Luis_Cortizo</dc:creator>
      <dc:date>2014-03-28T10:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Add RowNo() to avoid Duplicate key on inputfield</title>
      <link>https://community.qlik.com/t5/QlikView/Add-RowNo-to-avoid-Duplicate-key-on-inputfield/m-p/573971#M1104207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is no use because then I get the errormessage back for Duplicate records&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 11:34:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-RowNo-to-avoid-Duplicate-key-on-inputfield/m-p/573971#M1104207</guid>
      <dc:creator>amber2000</dc:creator>
      <dc:date>2014-03-28T11:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Add RowNo() to avoid Duplicate key on inputfield</title>
      <link>https://community.qlik.com/t5/QlikView/Add-RowNo-to-avoid-Duplicate-key-on-inputfield/m-p/573972#M1104208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;This is the solution that someone wrote and wich I'm trying to implement in my load script, hopefuly this makes more sense than my code above.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To help identify the problem, add a row number field to each row in the QlikView table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will give you at least one field that is unique on each of the duplicate rows. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do this without reloading the entire document. Here's an example-- First, save a backup copy of the report that you are working on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume that the table to which you want to add a row number is named REDFLIGHTS. Add these rows to the top of your loadscript:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REDFLIGHTS_X:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add Load RowNo() as REDFLIGHTS_RowNo, * Resident REDFLIGHTS;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table REDFLIGHTS;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rename Table REDFLIGHTS_X to REDFLIGHTS;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exit Script;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, from the menu, select File-&amp;gt;Partial Reload This will run the five lines you added to your loadscript and it will build a new table inside the document &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is identical to your original table but with a rownumber field, REDFLIGHTS_RowNo, added to the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, in a tablebox that includes the rownumber field or in a chart using the key fields as dimensions and using a count(REDFLIGHTS_RowNo) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;expression you will be able to identify the duplicate rows in the table. At that point you will have to figure out how to eliminate or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;handle the duplicate rows when data is loaded. Remember to remove the five lines from the top of your loadscript before you next try to reload data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*/ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 11:38:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-RowNo-to-avoid-Duplicate-key-on-inputfield/m-p/573972#M1104208</guid>
      <dc:creator>amber2000</dc:creator>
      <dc:date>2014-03-28T11:38:54Z</dc:date>
    </item>
  </channel>
</rss>

