<?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 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/For-each-next/m-p/2040263#M1222686</link>
    <description>&lt;P&gt;Nor exactly what you asked, but you could add all the variable- values to an inline table, and use the peek-function to loop through the values. Something like the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;tmp:
load * inline [
values
value1
value2
...
];

For i=0 to NoOfRows('tmp')
    let vVal=peek('values',i, 'tmp')
    /*  your code here */

nexi i;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please mark my answer as a solution, if it resolved your issue.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Feb 2023 13:47:09 GMT</pubDate>
    <dc:creator>E_Røse</dc:creator>
    <dc:date>2023-02-21T13:47:09Z</dc:date>
    <item>
      <title>For each ... next</title>
      <link>https://community.qlik.com/t5/QlikView/For-each-next/m-p/2040260#M1222685</link>
      <description>&lt;P&gt;Hi, I'm new here and in Qliksense.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have very long script line&lt;/P&gt;
&lt;P&gt;For each &lt;EM&gt;variable&lt;/EM&gt;&amp;nbsp; in 'Value1', 'Value2', 'Value3' ..... 'Value n+50'&lt;/P&gt;
&lt;P&gt;Next&lt;/P&gt;
&lt;P&gt;If all values are in one line, everything is ok. But when I try to split them to few lines and make more readable it's come Syntax error. I tried to put all values in the parentheses (), but still doesn't work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe somebody know how to solve this error, thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 09:49:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/For-each-next/m-p/2040260#M1222685</guid>
      <dc:creator>simona_123</dc:creator>
      <dc:date>2023-02-21T09:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: For each ... next</title>
      <link>https://community.qlik.com/t5/QlikView/For-each-next/m-p/2040263#M1222686</link>
      <description>&lt;P&gt;Nor exactly what you asked, but you could add all the variable- values to an inline table, and use the peek-function to loop through the values. Something like the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;tmp:
load * inline [
values
value1
value2
...
];

For i=0 to NoOfRows('tmp')
    let vVal=peek('values',i, 'tmp')
    /*  your code here */

nexi i;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please mark my answer as a solution, if it resolved your issue.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 13:47:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/For-each-next/m-p/2040263#M1222686</guid>
      <dc:creator>E_Røse</dc:creator>
      <dc:date>2023-02-21T13:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: For each ... next</title>
      <link>https://community.qlik.com/t5/QlikView/For-each-next/m-p/2041141#M1222719</link>
      <description>&lt;P&gt;a similar solution using&amp;nbsp;FieldValueList instead:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/May2022/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptControlStatements/For%20Each.htm#:~:text=Iterating%20through%20a%20the%20values%20of%20a%20field" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/May2022/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptControlStatements/For%20Each.htm#:~:text=Iterating%20through%20a%20the%20values%20of%20a%20field&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;tabTemp:
LOAD * Inline [
variable
Value1,
Value2,
Value3,
Value4,
Value5,
Value6,
Value7,
Value8,
Value9,
Value10
];

FOR Each variable in FieldValueList('variable')
	...
NEXT

DROP Table tabTemp;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 20:37:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/For-each-next/m-p/2041141#M1222719</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2023-02-22T20:37:46Z</dc:date>
    </item>
  </channel>
</rss>

