<?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: For Loops in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/For-Loops/m-p/1605318#M735724</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I don't think you need anything as complicated as a loop. Try;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;data:
LOAD * INLINE [
ITEM_ID , FLAG , AMOUNT
132,,8
132A,,12
89A,,5
];

load
	ITEM_ID,
	1 AS FLAG,
	AMOUNT
resident data
where right(ITEM_ID,1)='A';&lt;/LI-CODE&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jul 2019 19:10:03 GMT</pubDate>
    <dc:creator>chrismarlow</dc:creator>
    <dc:date>2019-07-23T19:10:03Z</dc:date>
    <item>
      <title>For Loops</title>
      <link>https://community.qlik.com/t5/QlikView/For-Loops/m-p/1605220#M735723</link>
      <description>&lt;P&gt;hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;i need to create a for loop to run through a column of my QVD (ITEM_ID) for all records that have an 'A' at the end of the ITEM_ID, then i need to copy these records to the end of the QVD table and populate the FLAG column with a '1'. so the last 2 records below would need repeated only with the FLAG column also populated. does anyone have an idea of how i go about this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;table looks similar to:&lt;/P&gt;&lt;P&gt;ITEM_ID | FLAG | AMOUNT&lt;/P&gt;&lt;P&gt;----------------------------------&lt;/P&gt;&lt;P&gt;132&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 8&lt;/P&gt;&lt;P&gt;132A&amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 12&lt;/P&gt;&lt;P&gt;89A&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; | 5&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:55:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/For-Loops/m-p/1605220#M735723</guid>
      <dc:creator>anonymous1</dc:creator>
      <dc:date>2024-11-16T02:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: For Loops</title>
      <link>https://community.qlik.com/t5/QlikView/For-Loops/m-p/1605318#M735724</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I don't think you need anything as complicated as a loop. Try;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;data:
LOAD * INLINE [
ITEM_ID , FLAG , AMOUNT
132,,8
132A,,12
89A,,5
];

load
	ITEM_ID,
	1 AS FLAG,
	AMOUNT
resident data
where right(ITEM_ID,1)='A';&lt;/LI-CODE&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 19:10:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/For-Loops/m-p/1605318#M735724</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2019-07-23T19:10:03Z</dc:date>
    </item>
  </channel>
</rss>

