<?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: Looping through sub fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Looping-through-sub-fields/m-p/762250#M271042</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;not sure what your problem is.&lt;/P&gt;&lt;P&gt;Why don't you use a for next statement to loop through all sub folders?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Feb 2015 15:04:19 GMT</pubDate>
    <dc:creator>giakoum</dc:creator>
    <dc:date>2015-02-20T15:04:19Z</dc:date>
    <item>
      <title>Looping through sub fields</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-through-sub-fields/m-p/762249#M271041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have 3 subfolders in a directory path &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C\test&lt;/P&gt;&lt;P&gt;in test there are folder1-prj,folder2-prj,folder3-prj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now i want to loop through these folders and run the following script &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPRESSIONDATA:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%Key_Data_7EB7522AE0A7D03B&lt;/P&gt;&lt;P&gt;as&lt;/P&gt;&lt;P&gt;ExpressionID,FilePath() as NameID&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;[ExpressionVisual/Label/v]&lt;/P&gt;&lt;P&gt;as&lt;/P&gt;&lt;P&gt;ExpressionName&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;[ExpressionData/Definition/v]&lt;/P&gt;&lt;P&gt;as&lt;/P&gt;&lt;P&gt;ExpressionCalc&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;[ExpressionVisual/Label/v]&lt;/P&gt;&lt;P&gt;&amp;amp;': ' &amp;amp;[ExpressionData/Definition/v]&lt;/P&gt;&lt;P&gt;as&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;REPLACE&lt;/P&gt;&lt;P&gt;(REPLACE&lt;/P&gt;&lt;P&gt;('$(File)','$(SubDirectory)',''),'.xml','') as&lt;/P&gt;&lt;P&gt;ObjectID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[$(File)] (XmlSimple&lt;/P&gt;&lt;P&gt;, Table&lt;/P&gt;&lt;P&gt;is&lt;/P&gt;&lt;P&gt;[GraphProperties/Expressions/ArrayOfMainExpressionData/MainExpressionData/Data]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHARTDATA:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;[ChartProperties/Title/Title/v]&lt;/P&gt;&lt;P&gt;as&lt;/P&gt;&lt;P&gt;ChartTitle&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;[Dimensions/ChartDimensionDataDef/PseudoDef/Name]&lt;/P&gt;&lt;P&gt;as&lt;/P&gt;&lt;P&gt;DimensionCalc&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;[TableProperties/ExpansionInfo/ExpansionData/Pos/DimName]&lt;/P&gt;&lt;P&gt;as&lt;/P&gt;&lt;P&gt;DimensionName&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;REPLACE&lt;/P&gt;&lt;P&gt;(REPLACE&lt;/P&gt;&lt;P&gt;('$(File)','$(SubDirectory)',''),'.xml','') as&lt;/P&gt;&lt;P&gt;ObjectID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[$(File)] (XmlSimple&lt;/P&gt;&lt;P&gt;, Table&lt;/P&gt;&lt;P&gt;is&lt;/P&gt;&lt;P&gt;[GraphProperties]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left&lt;/P&gt;&lt;P&gt;join&lt;/P&gt;&lt;P&gt;(CHARTDATA) load&lt;/P&gt;&lt;P&gt;ObjectID&lt;/P&gt;&lt;P&gt;,replace&lt;/P&gt;&lt;P&gt;(ObjectID&lt;/P&gt;&lt;P&gt;, 'CH','') as&lt;/P&gt;&lt;P&gt;CHTID&lt;/P&gt;&lt;P&gt;, concat&lt;/P&gt;&lt;P&gt;(distinct&lt;/P&gt;&lt;P&gt;DimensionCalc&lt;/P&gt;&lt;P&gt;) as&lt;/P&gt;&lt;P&gt;DimensionsConcat&lt;/P&gt;&lt;P&gt;REsident&lt;/P&gt;&lt;P&gt;CHARTDATA group&lt;/P&gt;&lt;P&gt;by&lt;/P&gt;&lt;P&gt;ObjectID&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left&lt;/P&gt;&lt;P&gt;join&lt;/P&gt;&lt;P&gt;(EXPRESSIONDATA) load&lt;/P&gt;&lt;P&gt;ObjectID&lt;/P&gt;&lt;P&gt;, &lt;/P&gt;&lt;P&gt;concat&lt;/P&gt;&lt;P&gt;(distinct&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;,'&lt;/P&gt;&lt;P&gt;' ) as&lt;/P&gt;&lt;P&gt;ExpressionsConcat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REsident&lt;/P&gt;&lt;P&gt;EXPRESSIONDATA group&lt;/P&gt;&lt;P&gt;by&lt;/P&gt;&lt;P&gt;ObjectID&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i run it in one of the subfolders it works well but i want to be able to loop through all the subfolders &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 14:58:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-through-sub-fields/m-p/762249#M271041</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-20T14:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through sub fields</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-through-sub-fields/m-p/762250#M271042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;not sure what your problem is.&lt;/P&gt;&lt;P&gt;Why don't you use a for next statement to loop through all sub folders?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 15:04:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-through-sub-fields/m-p/762250#M271042</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2015-02-20T15:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through sub fields</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-through-sub-fields/m-p/762251#M271043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can find code to (recursively) loop through subdirectories here: &lt;A href="https://community.qlik.com/thread/62449"&gt;loop through to load all files from a folder and its subfolders?&lt;/A&gt; You will want to replace the load code from the example with your code. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 15:06:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-through-sub-fields/m-p/762251#M271043</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-02-20T15:06:59Z</dc:date>
    </item>
  </channel>
</rss>

