<?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: Specifying a table for the value of a variable in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Specifying-a-table-for-the-value-of-a-variable/m-p/2050153#M86326</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/222209"&gt;@bajor14&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Not sure to understand your question, but if you want to store the years which is in your table YearList into your variable&amp;nbsp;vLoadedPartitionList, you can do this :&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LET vStartingYear = Year(Today()) - 4;
LET vTargetYear = Year(Today());

[YearList]:
LOAD 
    $(vStartingYear) + RowNo() - 1 AS Year
AUTOGENERATE 
    $(vTargetYear) - $(vStartingYear) + 1;
    
    
    
LET vCountYear  = FieldValueCount('Year');
Trace Number of years : $(vCountYear);

SET vYear_init = 1;

For i=1 to $(vCountYear)
  If '$(vYear_init)' = 1 then
    LET vYear_init = FieldValue('Year',$(i));
  Else
    LET vYear_init = '$(vYear_init)' &amp;amp; ',' &amp;amp; FieldValue('Year',$(i)); 
  End If
Next  

LET vLoadedPartitionList = chr(39) &amp;amp; '$(vYear_init)' &amp;amp; chr(39);

Trace vLoadedPartitionList = $(vLoadedPartitionList);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Agathe.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Mar 2023 14:45:33 GMT</pubDate>
    <dc:creator>AgatheClero</dc:creator>
    <dc:date>2023-03-16T14:45:33Z</dc:date>
    <item>
      <title>Specifying a table for the value of a variable</title>
      <link>https://community.qlik.com/t5/App-Development/Specifying-a-table-for-the-value-of-a-variable/m-p/2049952#M86305</link>
      <description>&lt;P&gt;Hi All!&lt;/P&gt;
&lt;P&gt;How can I enter the years in the Yearlist table into the vLoadedPartitionList variable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;LET vStartingYear = Year(Today()) - 4;
LET vTargetYear = Year(Today());

[YearList]:
LOAD 
    $(vStartingYear) + RowNo() - 1 AS Year
AUTOGENERATE 
    $(vTargetYear) - $(vStartingYear) + 1;

LET vLoadedPartitionList = ???; // Partition List. If it is not null, then only this partition(s) will be loaded. (for yearly partition(s): YYYY (eg: '2019, 2020')&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for all the help!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:59:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Specifying-a-table-for-the-value-of-a-variable/m-p/2049952#M86305</guid>
      <dc:creator>bajor14</dc:creator>
      <dc:date>2024-11-15T21:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying a table for the value of a variable</title>
      <link>https://community.qlik.com/t5/App-Development/Specifying-a-table-for-the-value-of-a-variable/m-p/2050153#M86326</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/222209"&gt;@bajor14&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Not sure to understand your question, but if you want to store the years which is in your table YearList into your variable&amp;nbsp;vLoadedPartitionList, you can do this :&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LET vStartingYear = Year(Today()) - 4;
LET vTargetYear = Year(Today());

[YearList]:
LOAD 
    $(vStartingYear) + RowNo() - 1 AS Year
AUTOGENERATE 
    $(vTargetYear) - $(vStartingYear) + 1;
    
    
    
LET vCountYear  = FieldValueCount('Year');
Trace Number of years : $(vCountYear);

SET vYear_init = 1;

For i=1 to $(vCountYear)
  If '$(vYear_init)' = 1 then
    LET vYear_init = FieldValue('Year',$(i));
  Else
    LET vYear_init = '$(vYear_init)' &amp;amp; ',' &amp;amp; FieldValue('Year',$(i)); 
  End If
Next  

LET vLoadedPartitionList = chr(39) &amp;amp; '$(vYear_init)' &amp;amp; chr(39);

Trace vLoadedPartitionList = $(vLoadedPartitionList);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Agathe.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 14:45:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Specifying-a-table-for-the-value-of-a-variable/m-p/2050153#M86326</guid>
      <dc:creator>AgatheClero</dc:creator>
      <dc:date>2023-03-16T14:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying a table for the value of a variable</title>
      <link>https://community.qlik.com/t5/App-Development/Specifying-a-table-for-the-value-of-a-variable/m-p/2050394#M86351</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Agathe!&lt;/P&gt;
&lt;P&gt;Perfect! That's exactly how I wanted it! Thank you very much!!!!!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 07:31:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Specifying-a-table-for-the-value-of-a-variable/m-p/2050394#M86351</guid>
      <dc:creator>bajor14</dc:creator>
      <dc:date>2023-03-17T07:31:52Z</dc:date>
    </item>
  </channel>
</rss>

