<?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 How can I use dynamic variables during load? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-can-I-use-dynamic-variables-during-load/m-p/2000226#M82839</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello Community,&lt;/P&gt;
&lt;P&gt;another of my Parent Child problems. I have a big data table file and want to split it into multiple smaller tables that contain a reference to their parent (table). The data that is being parsed can be reduced to this:&lt;/P&gt;
&lt;P&gt;ID Type&lt;BR /&gt;1&amp;nbsp; &amp;nbsp;Parent&lt;BR /&gt;2&amp;nbsp; &amp;nbsp;Child&lt;BR /&gt;3&amp;nbsp; &amp;nbsp;Parent&lt;BR /&gt;4&amp;nbsp; &amp;nbsp;Child&lt;BR /&gt;5&amp;nbsp; &amp;nbsp;Child&lt;BR /&gt;6&amp;nbsp; &amp;nbsp;Child&lt;/P&gt;
&lt;P&gt;The result should be&lt;/P&gt;
&lt;P&gt;ParentID ChildID&lt;BR /&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;BR /&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&lt;BR /&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;BR /&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6&lt;/P&gt;
&lt;P&gt;I tried to use a variable in the load statement that changes its value during the load, but the ParentID is always Null.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let vParent = Null();&lt;/P&gt;
&lt;P&gt;MyTable:&lt;BR /&gt;LOAD&lt;BR /&gt;If([Type]='Parent', '$(vParent)'=[ID],'$(vParent)') as ParentID,&lt;BR /&gt;If([Type]='Child', [ID], Peek('ChildID')) as ChildID,&lt;BR /&gt;FROM [lib://AttachedFiles/whatever.csv]&lt;BR /&gt;(txt, utf8, embedded labels, delimiter is ';', msq);&lt;/P&gt;
&lt;P&gt;What did I do wrong?&lt;/P&gt;</description>
    <pubDate>Fri, 04 Nov 2022 08:05:06 GMT</pubDate>
    <dc:creator>Dan17</dc:creator>
    <dc:date>2022-11-04T08:05:06Z</dc:date>
    <item>
      <title>How can I use dynamic variables during load?</title>
      <link>https://community.qlik.com/t5/App-Development/How-can-I-use-dynamic-variables-during-load/m-p/2000226#M82839</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello Community,&lt;/P&gt;
&lt;P&gt;another of my Parent Child problems. I have a big data table file and want to split it into multiple smaller tables that contain a reference to their parent (table). The data that is being parsed can be reduced to this:&lt;/P&gt;
&lt;P&gt;ID Type&lt;BR /&gt;1&amp;nbsp; &amp;nbsp;Parent&lt;BR /&gt;2&amp;nbsp; &amp;nbsp;Child&lt;BR /&gt;3&amp;nbsp; &amp;nbsp;Parent&lt;BR /&gt;4&amp;nbsp; &amp;nbsp;Child&lt;BR /&gt;5&amp;nbsp; &amp;nbsp;Child&lt;BR /&gt;6&amp;nbsp; &amp;nbsp;Child&lt;/P&gt;
&lt;P&gt;The result should be&lt;/P&gt;
&lt;P&gt;ParentID ChildID&lt;BR /&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;BR /&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&lt;BR /&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;BR /&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6&lt;/P&gt;
&lt;P&gt;I tried to use a variable in the load statement that changes its value during the load, but the ParentID is always Null.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let vParent = Null();&lt;/P&gt;
&lt;P&gt;MyTable:&lt;BR /&gt;LOAD&lt;BR /&gt;If([Type]='Parent', '$(vParent)'=[ID],'$(vParent)') as ParentID,&lt;BR /&gt;If([Type]='Child', [ID], Peek('ChildID')) as ChildID,&lt;BR /&gt;FROM [lib://AttachedFiles/whatever.csv]&lt;BR /&gt;(txt, utf8, embedded labels, delimiter is ';', msq);&lt;/P&gt;
&lt;P&gt;What did I do wrong?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 08:05:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-can-I-use-dynamic-variables-during-load/m-p/2000226#M82839</guid>
      <dc:creator>Dan17</dc:creator>
      <dc:date>2022-11-04T08:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use dynamic variables during load?</title>
      <link>https://community.qlik.com/t5/App-Development/How-can-I-use-dynamic-variables-during-load/m-p/2000889#M82891</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/181277"&gt;@Dan17&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried generic load?&lt;/P&gt;
&lt;P&gt;I think that should do the trick&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Design/The-Generic-Load/ba-p/1473470" target="_blank"&gt;https://community.qlik.com/t5/Design/The-Generic-Load/ba-p/1473470&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;hope this helps.&lt;/P&gt;
&lt;P&gt;best,&lt;/P&gt;
&lt;P class="p1"&gt;&lt;EM&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;help users find answers! Don't forget to mark a solution that worked for you &amp;amp; to smash the like button!&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN class="s2"&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 21:55:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-can-I-use-dynamic-variables-during-load/m-p/2000889#M82891</guid>
      <dc:creator>RafaelBarrios</dc:creator>
      <dc:date>2022-11-04T21:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use dynamic variables during load?</title>
      <link>https://community.qlik.com/t5/App-Development/How-can-I-use-dynamic-variables-during-load/m-p/2001085#M82914</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/90342"&gt;@RAF&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the answer is no. Until now I didn't even know something like generic load existed. After going thru the article and looking at my real source table, generic load would do more harm than good.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm currently working on splitting my input table into several smaller tables that contain the parent/child information before I let Qlik sense load it. A workaround but better than getting frustrated over another thing that Qlik sense is not able to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 08:59:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-can-I-use-dynamic-variables-during-load/m-p/2001085#M82914</guid>
      <dc:creator>Dan17</dc:creator>
      <dc:date>2022-11-07T08:59:05Z</dc:date>
    </item>
  </channel>
</rss>

