<?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: Forcing a dynamic value inline in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Forcing-a-dynamic-value-inline/m-p/1283648#M402227</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do it without a for next loop and all those variables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; right(year(now(1))-RecNo()-1,2) as [Order Header Order Date Year] AutoGenerate 3;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Nov 2016 11:40:55 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2016-11-21T11:40:55Z</dc:date>
    <item>
      <title>Forcing a dynamic value inline</title>
      <link>https://community.qlik.com/t5/QlikView/Forcing-a-dynamic-value-inline/m-p/1283647#M402226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif;"&gt;Having never done this before I will keep it short and sweet. &lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif;"&gt;I have needed to do this a few times building different models so thought I would share it in case someone else can benfit or better yet someone with more product knowledge suggest a better technique.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif;"&gt;With this bit of script I am hijacking the INLINE LOAD to force some values in to a table.&amp;nbsp; In this example I am loading the last three years to later use in another table load as a "WHERE exists(..."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif;"&gt;LET i = nothing;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif;"&gt;LET CONCATENATE = nothing;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif;"&gt;LET CONCATENATE = '';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif;"&gt;FOR i = 0 to 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if i &amp;gt; 0 then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif;"&gt; LET CONCATENATE = 'CONCATENATE';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif;"&gt;$(CONCATENATE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif;"&gt;FilterYears:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-family: 'Calibri',sans-serif;"&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-family: 'Calibri',sans-serif;"&gt; right(year(now(1))-$(i),2) as [Order Header Order Date Year]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-family: 'Calibri',sans-serif;"&gt;INLINE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-family: 'Calibri',sans-serif;"&gt;[&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-family: 'Calibri',sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Order Header Order Date Year&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-family: 'Calibri',sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-family: 'Calibri',sans-serif;"&gt;]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'Calibri',sans-serif;"&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif;"&gt;NEXT i;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif;"&gt;LET i = nothing;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif;"&gt;LET CONCATENATE = nothing;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif;"&gt;Cheers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif;"&gt;Oli&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 11:28:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forcing-a-dynamic-value-inline/m-p/1283647#M402226</guid>
      <dc:creator />
      <dc:date>2016-11-21T11:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing a dynamic value inline</title>
      <link>https://community.qlik.com/t5/QlikView/Forcing-a-dynamic-value-inline/m-p/1283648#M402227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do it without a for next loop and all those variables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; right(year(now(1))-RecNo()-1,2) as [Order Header Order Date Year] AutoGenerate 3;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 11:40:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forcing-a-dynamic-value-inline/m-p/1283648#M402227</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-11-21T11:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing a dynamic value inline</title>
      <link>https://community.qlik.com/t5/QlikView/Forcing-a-dynamic-value-inline/m-p/1283649#M402228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;now THAT'S a lot simpler!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I always forget about autogenerate as the only place I use it is in a calendar script which I copy paste from script to script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 14:37:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forcing-a-dynamic-value-inline/m-p/1283649#M402228</guid>
      <dc:creator />
      <dc:date>2016-11-21T14:37:51Z</dc:date>
    </item>
  </channel>
</rss>

