<?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 Need help in getting loop on loop (For loop) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-in-getting-loop-on-loop-For-loop/m-p/1614409#M596576</link>
    <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;I am looking for a help in getting the solution for following scenario.&lt;/P&gt;&lt;P&gt;1. I am trying to get the data from REST API and need to pass the &lt;FONT face="arial black,avant garde"&gt;state and from_date and to_date parameters&lt;/FONT&gt; to filter the data.&lt;/P&gt;&lt;P&gt;2. I would like to control the parameters using the inputs&amp;nbsp; in the attached excel sheet which has State_Param, Date_Param tabs.&lt;/P&gt;&lt;P&gt;3. Each state in the State_Param has to execute all the&amp;nbsp;&lt;FONT face="arial black,avant garde"&gt;from_date and to_date parameters independently.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;&amp;nbsp;Example: State "MI" has to complete the loop of 14 date combinations presented in Date_Param tab in the excel and then loop has to begin with another state and so on.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;17 states and 14 dates combinations: Each state 14 dates and reset the loop with another state in the list. 17 * 14 times.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;I am passing these parameters to REST API. I have verified the State looping and looking for solution for both State and date parameters.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;Sample URL:&amp;nbsp;CUSTOM CONNECT TO "Provider=QvRestConnector.exe;url=&lt;A href="https://api.xyz.com/sellers/search/v3?country%2US&amp;amp;state%2$" target="_blank"&gt;https://api.xyz.com/sellers/search/v3?country%2US&amp;amp;state%2$&lt;/A&gt;&lt;FONT color="#0000FF"&gt;(vState)&amp;amp;date%2$(vFrom_Date)TO$(vTo_Date)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;&lt;FONT color="#0000FF"&gt;Thanks in Advance!!&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 20:14:16 GMT</pubDate>
    <dc:creator>vkolasani</dc:creator>
    <dc:date>2024-11-16T20:14:16Z</dc:date>
    <item>
      <title>Need help in getting loop on loop (For loop)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-getting-loop-on-loop-For-loop/m-p/1614409#M596576</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;I am looking for a help in getting the solution for following scenario.&lt;/P&gt;&lt;P&gt;1. I am trying to get the data from REST API and need to pass the &lt;FONT face="arial black,avant garde"&gt;state and from_date and to_date parameters&lt;/FONT&gt; to filter the data.&lt;/P&gt;&lt;P&gt;2. I would like to control the parameters using the inputs&amp;nbsp; in the attached excel sheet which has State_Param, Date_Param tabs.&lt;/P&gt;&lt;P&gt;3. Each state in the State_Param has to execute all the&amp;nbsp;&lt;FONT face="arial black,avant garde"&gt;from_date and to_date parameters independently.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;&amp;nbsp;Example: State "MI" has to complete the loop of 14 date combinations presented in Date_Param tab in the excel and then loop has to begin with another state and so on.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;17 states and 14 dates combinations: Each state 14 dates and reset the loop with another state in the list. 17 * 14 times.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;I am passing these parameters to REST API. I have verified the State looping and looking for solution for both State and date parameters.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;Sample URL:&amp;nbsp;CUSTOM CONNECT TO "Provider=QvRestConnector.exe;url=&lt;A href="https://api.xyz.com/sellers/search/v3?country%2US&amp;amp;state%2$" target="_blank"&gt;https://api.xyz.com/sellers/search/v3?country%2US&amp;amp;state%2$&lt;/A&gt;&lt;FONT color="#0000FF"&gt;(vState)&amp;amp;date%2$(vFrom_Date)TO$(vTo_Date)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;&lt;FONT color="#0000FF"&gt;Thanks in Advance!!&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 20:14:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-getting-loop-on-loop-For-loop/m-p/1614409#M596576</guid>
      <dc:creator>vkolasani</dc:creator>
      <dc:date>2024-11-16T20:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in getting loop on loop (For loop)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-getting-loop-on-loop-For-loop/m-p/1614704#M596577</link>
      <description>&lt;P&gt;Hi, I think it can be done with something similar to this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;// Load states
States:
LOAD State
FROM [.\Qlikview_loop_states_and_dates.xlsx]
(ooxml, embedded labels, table is State_Param);

//Generate variables
FOR i=1 to NoOfRows('States')
	LET vState_$(i) = Peek('State', $(i)-1, 'States');
NEXT

// Store row number in variable and delete table
LET vNumStates = NoOfRows('States');
DROP Table States;

// Load dates
Dates:
LOAD fromt_date, to_date
FROM [.\Qlikview_loop_states_and_dates.xlsx]
(ooxml, embedded labels, table is Data_Param);

//Generate variables
FOR i=1 to NoOfRows('Dates')
	LET vFrom_Date_$(i) = Peek('fromt_date', $(i)-1, 'Dates');
	LET vTo_Date_$(i) = Peek('to_date', $(i)-1, 'Dates');
NEXT

// Store row number in variable and delete table
LET vNumDates = NoOfRows('Dates');
DROP Table Dates;

//Use variables in bucles
FOR vNumState=1 to $(vNumStates)
  FOR vNumDate=1 to $(vNumDates)
    CUSTOM CONNECT TO "Provider=QvRestConnector.exe;url=&amp;lt;a href="https://api.xyz.com/sellers/search/v3?country%2US&amp;amp;state%2$(vState_$(vNumState))&amp;amp;date%2$(vFrom_Date_$(vNumDate))TO$(vTo_Date_$(vNumDate" target="_blank"&amp;gt;https://api.xyz.com/sellers/search/v3?country%2US&amp;amp;state%2$(vState_$(vNumState))&amp;amp;date%2$(vFrom_Date_$(vNumDate))TO$(vTo_Date_$(vNumDate&amp;lt;/a&amp;gt;))";
    // Do something
  NEXT
NEXT&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 21 Aug 2019 10:21:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-getting-loop-on-loop-For-loop/m-p/1614704#M596577</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2019-08-21T10:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in getting loop on loop (For loop)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-getting-loop-on-loop-For-loop/m-p/1614705#M596578</link>
      <description>&lt;P&gt;Custom connect looks messy, it should be:&lt;/P&gt;&lt;P&gt;CUSTOM CONNECT TO "Provider=QvRestConnector.exe;url=&lt;A href="https://api.xyz.com/sellers/search/v3?country%2US&amp;amp;state%2" target="_blank"&gt;https://api.xyz.com/sellers/search/v3?country%2US&amp;amp;state%2&lt;/A&gt;&lt;STRONG&gt;$(vState_$(vNumState))&lt;/STRONG&gt;&amp;amp;date%2&lt;STRONG&gt;$(vFrom_Date_$(vNumDate))&lt;/STRONG&gt;TO&lt;STRONG&gt;$(vTo_Date_$(vNumDate))&lt;/STRONG&gt;";&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 10:23:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-getting-loop-on-loop-For-loop/m-p/1614705#M596578</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2019-08-21T10:23:44Z</dc:date>
    </item>
  </channel>
</rss>

