<?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 AW:Re: Question: using the value of a field as field name in Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Question-using-the-value-of-a-field-as-field-name-in-Script/m-p/173528#M42684</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick response Miguel and thanks for this idea. It'll gonna really time comsuming because I have quite huge tables... but your idea brought me to some more searching and I got this &lt;A href="http://community.qlik.com/forums/p/23638/90312.aspx#90312" target="_blank"&gt;posting from John Witherspoon&lt;/A&gt; t&lt;STRONG&gt;&lt;/STRONG&gt;ouching the topic under "dynamically load".&lt;/P&gt;&lt;P&gt;I'll build my lines and will then post them here.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Snoman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Aug 2010 12:22:26 GMT</pubDate>
    <dc:creator>obmk</dc:creator>
    <dc:date>2010-08-25T12:22:26Z</dc:date>
    <item>
      <title>Question: using the value of a field as field name in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Question-using-the-value-of-a-field-as-field-name-in-Script/m-p/173526#M42682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'd like to know please if there is a way to use the Value/Content of a field as field name in the AS of a LOAD statement.&lt;/P&gt;&lt;P&gt;Example:&lt;BR /&gt;&lt;BR /&gt;In a Table 'Maschinen' there is (among many others) a field 'MaschID' like&lt;BR /&gt;'TP01_01_01'&lt;BR /&gt;'TP01_01_02'&lt;BR /&gt;...&lt;BR /&gt;'TP_02_01_01'&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;In al LOAD statement, I check the MaschID and collect data like this:&lt;/P&gt;&lt;P&gt;TempData:&lt;BR /&gt;load&lt;BR /&gt;&lt;BR /&gt;foo1 as bar2,&lt;BR /&gt;foo2 as bar3&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;resident Maschinen&lt;BR /&gt;where left(MaschID, 4) = 'TP01';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far. Now, I want to use the value/content of each 'MaschID' to build a reference with the "... AS ... " to another table 'ProductionSites' which has some colums named exactly like the value of MaschID. i.e. (in pseudo code):&lt;/P&gt;&lt;P&gt;TempData:&lt;BR /&gt;load&lt;BR /&gt;... as &lt;I&gt;getTheValueOf(MaschID)&lt;BR /&gt;&lt;BR /&gt;&lt;/I&gt;resident Maschinen&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;Unfortunately, &lt;I&gt;getTheValueOf(MaschID)&lt;/I&gt; does not work.... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Does anybody know a/the solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot in advance&lt;BR /&gt;Snoman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 09:43:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-using-the-value-of-a-field-as-field-name-in-Script/m-p/173526#M42682</guid>
      <dc:creator>obmk</dc:creator>
      <dc:date>2010-08-25T09:43:24Z</dc:date>
    </item>
    <item>
      <title>Question: using the value of a field as field name in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Question-using-the-value-of-a-field-as-field-name-in-Script/m-p/173527#M42683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Snoman,&lt;/P&gt;&lt;P&gt;One workaround may be to load a table with all possible values from your field, then do a for loop and for any possible value of that first table, load a second table with renamed fields. Using for will take a lot of time though. It should look like (untested)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;FieldWithValues:LOAD MaschID RESIDENT Maschinen;FOR i = 1 TO NoOfRows('FieldWithValues') SET vTempFieldName = FieldValue('MaschID', $(i)); TempData: LOAD TempField as $(vTempFieldName) RESIDENT Maschinen;NEXT&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 09:54:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-using-the-value-of-a-field-as-field-name-in-Script/m-p/173527#M42683</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-08-25T09:54:00Z</dc:date>
    </item>
    <item>
      <title>AW:Re: Question: using the value of a field as field name in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Question-using-the-value-of-a-field-as-field-name-in-Script/m-p/173528#M42684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick response Miguel and thanks for this idea. It'll gonna really time comsuming because I have quite huge tables... but your idea brought me to some more searching and I got this &lt;A href="http://community.qlik.com/forums/p/23638/90312.aspx#90312" target="_blank"&gt;posting from John Witherspoon&lt;/A&gt; t&lt;STRONG&gt;&lt;/STRONG&gt;ouching the topic under "dynamically load".&lt;/P&gt;&lt;P&gt;I'll build my lines and will then post them here.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Snoman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 12:22:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-using-the-value-of-a-field-as-field-name-in-Script/m-p/173528#M42684</guid>
      <dc:creator>obmk</dc:creator>
      <dc:date>2010-08-25T12:22:26Z</dc:date>
    </item>
  </channel>
</rss>

