<?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 Load all fields of a data table in a Multibox in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-all-fields-of-a-data-table-in-a-Multibox/m-p/461588#M172370</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello to everybody&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone please help me solving the following problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I built an application which bases on three data tables (Customer, Transactions, Products). The names of these data tables are fix. But the number and some names of the fields change over time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to automate that all fields of a data table (Customer) are loaded in a multi box and / or in a cycle group. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I solve that? &lt;/P&gt;&lt;P&gt;- In a macro? &lt;/P&gt;&lt;P&gt;- In the load script? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please assist me in designing the necessary code? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very much&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 22 Dec 2012 00:38:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-12-22T00:38:17Z</dc:date>
    <item>
      <title>Load all fields of a data table in a Multibox</title>
      <link>https://community.qlik.com/t5/QlikView/Load-all-fields-of-a-data-table-in-a-Multibox/m-p/461588#M172370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello to everybody&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone please help me solving the following problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I built an application which bases on three data tables (Customer, Transactions, Products). The names of these data tables are fix. But the number and some names of the fields change over time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to automate that all fields of a data table (Customer) are loaded in a multi box and / or in a cycle group. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I solve that? &lt;/P&gt;&lt;P&gt;- In a macro? &lt;/P&gt;&lt;P&gt;- In the load script? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please assist me in designing the necessary code? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very much&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Dec 2012 00:38:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-all-fields-of-a-data-table-in-a-Multibox/m-p/461588#M172370</guid>
      <dc:creator />
      <dc:date>2012-12-22T00:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Load all fields of a data table in a Multibox</title>
      <link>https://community.qlik.com/t5/QlikView/Load-all-fields-of-a-data-table-in-a-Multibox/m-p/461589#M172371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No ideas I could manage this? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to find a solution for about 2 days; actually without any success (I am a little bit new to Macros).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found a code to automatically add fields to a group. But I still don't know how to loop over a certain data table and get all field names&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub add_Group&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;' -----------THIS DOES NOT WORK: Loop over a data table and get all field names; ANY IDEAS HOW TO SOLVE THAT? &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FOR vColumnCounter = 1 TO NoOfFields("MyTable")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set vFieldName = FieldName(vColumnCounter, vTableName)&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call Add_grp(vFieldName)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NEXT&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #339966;"&gt;&lt;STRONG&gt;' -----------THIS WORKS: Adding fields to a group&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sub Add_grp(field)&lt;/P&gt;&lt;P&gt;set group = ActiveDocument.GetGroup("NameOfTheGroup")&lt;/P&gt;&lt;P&gt;set gp = group.GetProperties&lt;/P&gt;&lt;P&gt;set vars = gp.FieldDefs&lt;/P&gt;&lt;P&gt;for i = 0 to vars.Count-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set fld = vars(i)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if field = fld.name then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; counter = 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if counter = 0 then&lt;/P&gt;&lt;P&gt;group.AddField field&lt;/P&gt;&lt;P&gt;msgbox field &amp;amp;" is Added to Group"&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Dec 2012 10:38:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-all-fields-of-a-data-table-in-a-Multibox/m-p/461589#M172371</guid>
      <dc:creator />
      <dc:date>2012-12-22T10:38:55Z</dc:date>
    </item>
  </channel>
</rss>

