<?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: While Loop in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/While-Loop/m-p/1947528#M78085</link>
    <description>&lt;P&gt;I was seeking an alternative method due to a bug I was having in my preferred solution. I am still learning SQL some and was not entirely sure how I could mix loops and control statements in with a select statement, if at all.&lt;BR /&gt;&lt;BR /&gt;I have since then resolved said bug, and have been advised thanks to you.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;As for your response, thank you, you answered my question.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jun 2022 15:54:10 GMT</pubDate>
    <dc:creator>hudam</dc:creator>
    <dc:date>2022-06-23T15:54:10Z</dc:date>
    <item>
      <title>While Loop</title>
      <link>https://community.qlik.com/t5/App-Development/While-Loop/m-p/1947036#M78033</link>
      <description>&lt;P&gt;On a call log, I am trying to count the number of calls it takes to make 'human contact'.&amp;nbsp; There is a contact_id field that groups the calls to a single individual. One individual will have one contact_id and each contact_id can have multiples rows (calls).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Human contact is establish by the field 'contacted' being populated.&lt;BR /&gt;&lt;BR /&gt;I am trying to us a while loop in the load editor to obtain these results.&amp;nbsp; I want to have a counter variable that will stop counting once we have identified the first 'contacted' field that is populated for each contact_id.&amp;nbsp; &amp;nbsp;Here is some syntax for further clarity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;let ct = 0;&lt;/P&gt;
&lt;P&gt;while (isnull(contacted) = -1)&lt;/P&gt;
&lt;P&gt;ct = ct + 1 ;&lt;/P&gt;
&lt;P&gt;loop&lt;BR /&gt;&lt;BR /&gt;Load&lt;BR /&gt;'$(ct)' as numOfCalls;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I am unsure how to fit this logic into the Load script to obtain my desired results.&amp;nbsp; Any guidance or direction would be appreciated.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 18:35:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/While-Loop/m-p/1947036#M78033</guid>
      <dc:creator>hudam</dc:creator>
      <dc:date>2022-06-22T18:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: While Loop</title>
      <link>https://community.qlik.com/t5/App-Development/While-Loop/m-p/1947094#M78039</link>
      <description>&lt;P&gt;I don't think you need to loop over field values of a table like this. There should be shorter and better performing solutions.&lt;/P&gt;
&lt;P&gt;Can you please provide some different examples and your expected results?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 21:18:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/While-Loop/m-p/1947094#M78039</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2022-06-22T21:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: While Loop</title>
      <link>https://community.qlik.com/t5/App-Development/While-Loop/m-p/1947528#M78085</link>
      <description>&lt;P&gt;I was seeking an alternative method due to a bug I was having in my preferred solution. I am still learning SQL some and was not entirely sure how I could mix loops and control statements in with a select statement, if at all.&lt;BR /&gt;&lt;BR /&gt;I have since then resolved said bug, and have been advised thanks to you.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;As for your response, thank you, you answered my question.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 15:54:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/While-Loop/m-p/1947528#M78085</guid>
      <dc:creator>hudam</dc:creator>
      <dc:date>2022-06-23T15:54:10Z</dc:date>
    </item>
  </channel>
</rss>

