<?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: Assigning rows a unique ID in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Assigning-rows-a-unique-ID/m-p/1692471#M52925</link>
    <description>&lt;P&gt;Hi Lisa,&lt;/P&gt;&lt;P&gt;Thank you for your reply. I had to change "F MPG" in autonumber to "F MC" since F MPG isnt a unique value i believe. But, in the end it worked fine for me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Apr 2020 16:42:01 GMT</pubDate>
    <dc:creator>waleeed_mahmood</dc:creator>
    <dc:date>2020-04-09T16:42:01Z</dc:date>
    <item>
      <title>Assigning rows a unique ID</title>
      <link>https://community.qlik.com/t5/App-Development/Assigning-rows-a-unique-ID/m-p/1692199#M52879</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I have a Qlik related problem i cant seem find any help on.&lt;/P&gt;&lt;P&gt;I have a Table called Table A. It has around 20 columns and 26000 rows. From that table i extract a new table with the fields i need, as shown below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="table1.JPG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/31553i4B663EBF12F850D9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="table1.JPG" alt="table1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To extract the above table from Table A, i used the following Script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;load
    Distinct("F MPG") as MPG,
    EFlag as ef,
    RFlag as rf,
    [SAP Material] as SAPM,
    "C L2 NP" as L2,
    "F MC" as MC,
    Owner as owner,
    '0%' as "Planned Change",
    FSIML2NP as FSIM
Resident Material_Master_Table;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i want to do, is assign a row number (1-to-n) for all the rows in my extracted table. From my experiments, i cant seem to use Rowno() or RecNo() becuase i am using DISTINCT in my extract script as shown above. So, if i were to use RowNo()/RecNo() it would make no sense. Even if i wasnt using distinct in my script, i still would not want to have the RowNo/RecNo from the original table. I have tried using AutoNumber(SAPM,FMPG) and few other variations of autonumber, but so far no luck.&lt;/P&gt;&lt;P&gt;About my fields:&lt;/P&gt;&lt;P&gt;For each MPG, there could be multiple MCs as shown above.&lt;/P&gt;&lt;P&gt;SAPM field has unique entry for each row (its a product number).&lt;/P&gt;&lt;P&gt;Multiple MPGs/MC can belong to one Owner.&lt;/P&gt;&lt;P&gt;L2 and FSIM are just numbers that i use in other calculations.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OUTPUT:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;it would be similar to picture shown, except there would be an ID column which has unique number for each row of that table.&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;ID&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;Owner&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;MPG&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;MC&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;PlannedChange&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;Actual Change&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;1&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;001&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;8A&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;AS4....&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;..%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;2&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;001&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;8A&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;AS4....&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;..%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;3&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;001&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;8A&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;AS4....&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;..%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;4&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;001&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;8A&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;AS4....&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;..%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;5&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;001&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;8A&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;AS4....&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;0&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;..%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Note: I didnt type all the values, but this should give the output idea.&lt;/P&gt;&lt;P&gt;I'd really appreciate the help!!!!&lt;/P&gt;&lt;P&gt;Please let me know if you need more information.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:48:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assigning-rows-a-unique-ID/m-p/1692199#M52879</guid>
      <dc:creator>waleeed_mahmood</dc:creator>
      <dc:date>2024-11-16T18:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning rows a unique ID</title>
      <link>https://community.qlik.com/t5/App-Development/Assigning-rows-a-unique-ID/m-p/1692226#M52881</link>
      <description>&lt;P&gt;Try using Autonumber feature:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;load
    Distinct("F MPG") as MPG,
    Autonumber("F MPG") as ID,
    EFlag as ef,
    RFlag as rf,
    [SAP Material] as SAPM,
    "C L2 NP" as L2,
    "F MC" as MC,
    Owner as owner,
    '0%' as "Planned Change",
    FSIML2NP as FSIM
Resident Material_Master_Table;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 09 Apr 2020 03:44:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assigning-rows-a-unique-ID/m-p/1692226#M52881</guid>
      <dc:creator>Lisa_P</dc:creator>
      <dc:date>2020-04-09T03:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning rows a unique ID</title>
      <link>https://community.qlik.com/t5/App-Development/Assigning-rows-a-unique-ID/m-p/1692471#M52925</link>
      <description>&lt;P&gt;Hi Lisa,&lt;/P&gt;&lt;P&gt;Thank you for your reply. I had to change "F MPG" in autonumber to "F MC" since F MPG isnt a unique value i believe. But, in the end it worked fine for me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 16:42:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assigning-rows-a-unique-ID/m-p/1692471#M52925</guid>
      <dc:creator>waleeed_mahmood</dc:creator>
      <dc:date>2020-04-09T16:42:01Z</dc:date>
    </item>
  </channel>
</rss>

