<?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: Issues Combining Tables Following Generic Load in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Issues-Combining-Tables-Following-Generic-Load/m-p/1789012#M61623</link>
    <description>&lt;P&gt;I believe your test for tablename "Category.*" is incorrect. You should be testing a string (with single quotes).&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;If SubField(&lt;STRONG&gt;'$(&lt;/STRONG&gt;vTableName&lt;STRONG&gt;)'&lt;/STRONG&gt; ,'.',1)='Category' THEN&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think an overall simpler script to combine might be:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;CombinedTable:&lt;BR /&gt;Load Distinct name,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; key,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; value&lt;BR /&gt;Resident CategoryTableElements;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;FOR i = NoOfTables()-1 to 0 STEP -1 
&amp;nbsp; LET vTable=TableName($(i)); 
&amp;nbsp; IF WildMatch('$(vTable)', 'Category.*') THEN 
&amp;nbsp; &amp;nbsp; LEFT JOIN (&lt;SPAN&gt;CombinedTable&lt;/SPAN&gt;) LOAD * RESIDENT    [$(vTable)]; 
&amp;nbsp; &amp;nbsp; DROP TABLE &amp;nbsp;[$(vTable)]; 
&amp;nbsp; ENDIF 
NEXT i&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Rob&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 07 Mar 2021 18:31:09 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2021-03-07T18:31:09Z</dc:date>
    <item>
      <title>Issues Combining Tables Following Generic Load</title>
      <link>https://community.qlik.com/t5/App-Development/Issues-Combining-Tables-Following-Generic-Load/m-p/1788837#M61607</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having some issues dressing up some data for analysis in Qlik Sense.&amp;nbsp; The raw data that I'm working with contains category under a single field in a string formatted like: id,1234,name,CategoryName,description,descriptioninfo....etc.&lt;/P&gt;&lt;P&gt;Using Subfield() I have a table of category elements formatted as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ItemName,&amp;nbsp; Key, Value&lt;/P&gt;&lt;P&gt;item1, id, 1234&lt;/P&gt;&lt;P&gt;item1, name, category1&lt;/P&gt;&lt;P&gt;item1, description, info1&lt;/P&gt;&lt;P&gt;item2, id,&amp;nbsp; 2341&lt;/P&gt;&lt;P&gt;item2, name,&amp;nbsp; category2&lt;/P&gt;&lt;P&gt;item2, description, info2&lt;/P&gt;&lt;P&gt;etc...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand that a generic load&amp;nbsp; will help me split the elements so I can join the tables together and drop the extras, however my script doesn't seem to accomplish this. On reloading my data, all the generic tables remain, and none of them are joined to the final table. My script is as follows:&lt;/P&gt;&lt;P&gt;Category:&lt;BR /&gt;Generic&lt;BR /&gt;Load name as name,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; key as key,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; value as value&lt;BR /&gt;Resident CategoryTableElements;&lt;/P&gt;&lt;P&gt;Set vListOfTables = ;&lt;/P&gt;&lt;P&gt;For vTableNo = 0 to NoOfTables()-1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Let vTableName = TableName($(vTableNo));&lt;BR /&gt;&amp;nbsp; &amp;nbsp; If SubField(vTableName,'.',1)='Category' THEN&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Let vListOfTables = vListOfTables&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;amp; if(Len(vListOfTables) &amp;gt; 0, ',')&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;amp; Chr(39) &amp;amp; vTableName &amp;amp; Chr(39);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; End If&lt;BR /&gt;Next vTableNo&lt;/P&gt;&lt;P&gt;CombinedTable:&lt;BR /&gt;Load Distinct name,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; key,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; value&lt;BR /&gt;Resident CategoryTableElements;&lt;/P&gt;&lt;P&gt;For Each vTableName In $(ListOfTables)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Left Join(CombinedTable) Load * Resident [$(vTableName)];&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Drop Table [$(vTableName)];&lt;BR /&gt;Next vTableName&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Despite following examples online, and the module in the Continuous Classroom verbatim, my tables don't get combined. Any advice is greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 17:24:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issues-Combining-Tables-Following-Generic-Load/m-p/1788837#M61607</guid>
      <dc:creator>Benomi</dc:creator>
      <dc:date>2024-11-16T17:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Issues Combining Tables Following Generic Load</title>
      <link>https://community.qlik.com/t5/App-Development/Issues-Combining-Tables-Following-Generic-Load/m-p/1788850#M61608</link>
      <description>&lt;P&gt;Are you looking something like this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CategoryTableElements:
LOAD * INLINE [
ItemName,  Key, Value
item1, id, 1234
item1, name, category1
item1, description, info1
item2, id,  2341
item2, name,  category2
item2, description, info2
];

Category:
Generic
Load ItemName,
    Key,
    Value
Resident CategoryTableElements;

Drop Table CategoryTableElements;&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 06 Mar 2021 01:47:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issues-Combining-Tables-Following-Generic-Load/m-p/1788850#M61608</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2021-03-06T01:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Issues Combining Tables Following Generic Load</title>
      <link>https://community.qlik.com/t5/App-Development/Issues-Combining-Tables-Following-Generic-Load/m-p/1788852#M61609</link>
      <description>&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commQV32.PNG" style="width: 212px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/50555iA0039DAECA7C4053/image-size/large?v=v2&amp;amp;px=999" role="button" title="commQV32.PNG" alt="commQV32.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Mar 2021 01:48:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issues-Combining-Tables-Following-Generic-Load/m-p/1788852#M61609</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2021-03-06T01:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Issues Combining Tables Following Generic Load</title>
      <link>https://community.qlik.com/t5/App-Development/Issues-Combining-Tables-Following-Generic-Load/m-p/1789012#M61623</link>
      <description>&lt;P&gt;I believe your test for tablename "Category.*" is incorrect. You should be testing a string (with single quotes).&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;If SubField(&lt;STRONG&gt;'$(&lt;/STRONG&gt;vTableName&lt;STRONG&gt;)'&lt;/STRONG&gt; ,'.',1)='Category' THEN&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think an overall simpler script to combine might be:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;CombinedTable:&lt;BR /&gt;Load Distinct name,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; key,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; value&lt;BR /&gt;Resident CategoryTableElements;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;FOR i = NoOfTables()-1 to 0 STEP -1 
&amp;nbsp; LET vTable=TableName($(i)); 
&amp;nbsp; IF WildMatch('$(vTable)', 'Category.*') THEN 
&amp;nbsp; &amp;nbsp; LEFT JOIN (&lt;SPAN&gt;CombinedTable&lt;/SPAN&gt;) LOAD * RESIDENT    [$(vTable)]; 
&amp;nbsp; &amp;nbsp; DROP TABLE &amp;nbsp;[$(vTable)]; 
&amp;nbsp; ENDIF 
NEXT i&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Rob&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Mar 2021 18:31:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issues-Combining-Tables-Following-Generic-Load/m-p/1789012#M61623</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2021-03-07T18:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Issues Combining Tables Following Generic Load</title>
      <link>https://community.qlik.com/t5/App-Development/Issues-Combining-Tables-Following-Generic-Load/m-p/1789312#M61663</link>
      <description>&lt;P&gt;That'll do it! Thanks a ton for the help. Your solution is much more concise than the one provided in the QCC.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 18:23:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issues-Combining-Tables-Following-Generic-Load/m-p/1789312#M61663</guid>
      <dc:creator>Benomi</dc:creator>
      <dc:date>2021-03-08T18:23:55Z</dc:date>
    </item>
  </channel>
</rss>

