<?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 each...next. Customer start date and end date from acitivty history table. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/For-each-next-Customer-start-date-and-end-date-from-acitivty/m-p/111369#M7666</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi these are slightly helpful but i was hoping to have more about evaluating field values using a for each loop? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would actually like to find a way of bringing in multiple fields from other tables intto this bit of 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;For each a in FieldValueList('CustomerID')&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;'$(a)' &amp;amp; '-' &amp;amp; RecNo() as CustomerID&lt;/P&gt;&lt;P&gt;Autogenerate 1;&lt;/P&gt;&lt;P&gt;next a&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Sep 2018 11:54:37 GMT</pubDate>
    <dc:creator>alextomlins</dc:creator>
    <dc:date>2018-09-10T11:54:37Z</dc:date>
    <item>
      <title>For each...next. Customer start date and end date from acitivty history table.</title>
      <link>https://community.qlik.com/t5/App-Development/For-each-next-Customer-start-date-and-end-date-from-acitivty/m-p/111365#M7662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not familiar with loops but I believe i need a foreach...next loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to take a table with customer activities such as subscribe, unsubscribe. From this i would like a start date and an end date BUT the problem is that i can't just use min and max because the customers may have multiple subscriptions. So I need to go through each user and use some logic to determine their start and their end date and create a row for this one subscription and then start a loop again for that customer and create another row for a second subscription if there is one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are unable to help with the above -I am new to loops etc in Qlik and if anyone has any documentation explaining the syntax and uses of all the different type that would be great. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even if you don't know the exact answer i am looking for the rough approach i would need to take. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again Qlik community. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alex &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2018 10:07:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-each-next-Customer-start-date-and-end-date-from-acitivty/m-p/111365#M7662</guid>
      <dc:creator>alextomlins</dc:creator>
      <dc:date>2018-09-10T10:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: For each...next. Customer start date and end date from acitivty history table.</title>
      <link>https://community.qlik.com/t5/App-Development/For-each-next-Customer-start-date-and-end-date-from-acitivty/m-p/111366#M7663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go through this link &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-4452"&gt;Load Multiple excel sheets using For loop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/271700"&gt;Qlikview Load Multiple Excel Sheets (Concatenate &amp;amp;amp; Join tables)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/thread/252808" title="https://community.qlik.com/thread/252808"&gt;https://community.qlik.com/thread/252808&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Vikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2018 10:47:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-each-next-Customer-start-date-and-end-date-from-acitivty/m-p/111366#M7663</guid>
      <dc:creator>vikasmahajan</dc:creator>
      <dc:date>2018-09-10T10:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: For each...next. Customer start date and end date from acitivty history table.</title>
      <link>https://community.qlik.com/t5/App-Development/For-each-next-Customer-start-date-and-end-date-from-acitivty/m-p/111367#M7664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure wat u r looking for bt u can try following-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;load * inline [&lt;/P&gt;&lt;P&gt;type , customer , Date&lt;/P&gt;&lt;P&gt;subscribe , Abc , 8/10/2018&lt;/P&gt;&lt;P&gt;subscribe , Abc , 7/10/2018&lt;/P&gt;&lt;P&gt;subscribe , Abc , 6/10/2018&lt;/P&gt;&lt;P&gt;subscribe , Abc , 5/10/2018&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;final:&lt;/P&gt;&lt;P&gt;load Date(min(Date)) as Start_Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(Max(Date)) as End_Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; customer&lt;/P&gt;&lt;P&gt;Resident Data&lt;/P&gt;&lt;P&gt;Group by customer;&lt;/P&gt;&lt;P&gt;drop Table Data;&lt;/P&gt;&lt;P&gt;exit script;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;it will be great if u can provide sample data with expected output&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2018 10:49:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-each-next-Customer-start-date-and-end-date-from-acitivty/m-p/111367#M7664</guid>
      <dc:creator>PunamWagh</dc:creator>
      <dc:date>2018-09-10T10:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: For each...next. Customer start date and end date from acitivty history table.</title>
      <link>https://community.qlik.com/t5/App-Development/For-each-next-Customer-start-date-and-end-date-from-acitivty/m-p/111368#M7665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Punam,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i've done this as a resident load but the problem is that customers may have resubscribed later and then unsubscribed again under the same Customer ID. At the moment i am trying to do a for each...next loop to go through each customer id and create a row for each customer that details either first subscription or second subscription etc. I have no idea how to do it though&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for now i am starting with just trying to use this 'for each next loop' to get the start date for each customers. at the moment i can only get the CustomerID in the loop. This is what i am using - how do i get another field value into it from the same table so that i can later apply some logic to them? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each a in FieldValueList('CustomerID')&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;'$(a)' &amp;amp; '-' &amp;amp; RecNo() as CustomerID&lt;/P&gt;&lt;P&gt;Autogenerate 1;&lt;/P&gt;&lt;P&gt;next a&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alex &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2018 11:50:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-each-next-Customer-start-date-and-end-date-from-acitivty/m-p/111368#M7665</guid>
      <dc:creator>alextomlins</dc:creator>
      <dc:date>2018-09-10T11:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: For each...next. Customer start date and end date from acitivty history table.</title>
      <link>https://community.qlik.com/t5/App-Development/For-each-next-Customer-start-date-and-end-date-from-acitivty/m-p/111369#M7666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi these are slightly helpful but i was hoping to have more about evaluating field values using a for each loop? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would actually like to find a way of bringing in multiple fields from other tables intto this bit of 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;For each a in FieldValueList('CustomerID')&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;'$(a)' &amp;amp; '-' &amp;amp; RecNo() as CustomerID&lt;/P&gt;&lt;P&gt;Autogenerate 1;&lt;/P&gt;&lt;P&gt;next a&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2018 11:54:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-each-next-Customer-start-date-and-end-date-from-acitivty/m-p/111369#M7666</guid>
      <dc:creator>alextomlins</dc:creator>
      <dc:date>2018-09-10T11:54:37Z</dc:date>
    </item>
  </channel>
</rss>

