<?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 Is there a way to dynamicaly create objects from data values ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Is-there-a-way-to-dynamicaly-create-objects-from-data-values/m-p/172260#M41871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mean something like that (pseudo-code)&lt;/P&gt;&lt;P&gt;SET posX = 50;&lt;BR /&gt;SET posY = 10;&lt;BR /&gt;SET Width = 150;&lt;BR /&gt;SET Height = 100;&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;for i = 1 to 16&lt;/B&gt;&lt;BR /&gt; &lt;B&gt;Codzn$(i)Values:&lt;/B&gt;&lt;BR /&gt; LOAD&lt;BR /&gt; SQL select tbl1.cletbl, tbl1.lib1&lt;BR /&gt; from tbl tbl1&lt;BR /&gt; inner join tbl tbl2 on tbl2.lib2 = tbl1.codtbl&lt;BR /&gt; where tbl2.codtbl = 'zon' and tbl2.cletbl = 'PRO0$(left('0' &amp;amp; i, 2))';&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;Codzn$(i)Name:&lt;/B&gt;&lt;BR /&gt; SQL select tbl.lib1 from tbl where codtbl = 'zon' and cletbl = 'PRO0$(left('0' &amp;amp; i, 2))';&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;CreateListObject(Sheet1, Posx, Posy, Width, Height, Codzn$(i)Name, Codzn$(i)Values);&lt;/B&gt;&lt;BR /&gt; LET PosY = PosY + 150;&lt;BR /&gt;next&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Mar 2011 09:00:19 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-22T09:00:19Z</dc:date>
    <item>
      <title>Is there a way to dynamicaly create objects from data values ?</title>
      <link>https://community.qlik.com/t5/QlikView/Is-there-a-way-to-dynamicaly-create-objects-from-data-values/m-p/172257#M41868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a database with this architecture :&lt;/P&gt;&lt;P&gt;PRO ( CODPRO, NOMPRO, CODZN1, CODZN2... CODZN16)&lt;/P&gt;&lt;P&gt;TBL (CODTBL, CLETBL, NOMTBL, LIB1, LIB2)&lt;/P&gt;&lt;P&gt;In the CODZNxx fields of the table PRO, I find "generic" data. I mean those values names, types and list depends of a record in the TBL table.&lt;/P&gt;&lt;P&gt;SELECT LIB1, LIB2 FROM TBL WHERE CODTBL = 'zon' AND CLETBL = 'PRO0xx' (where xx is the the same as in CODZNxx) gives me in LIB1 : The CODZNxx friendly name, and LIB2 the CODTBL where I'll find the list of values I can use in the CODZNxx field.&lt;/P&gt;&lt;P&gt;Example :&lt;/P&gt;&lt;P&gt;SELECT CODZN&lt;B&gt;1&lt;/B&gt; FROM PRO WHERE CODPRO = '000001'&lt;/P&gt;&lt;P&gt;=&amp;gt; CODZN&lt;B&gt;1&lt;/B&gt; = '&lt;B&gt;FR&lt;/B&gt;'&lt;/P&gt;&lt;P&gt;SELECT LIB1, LIB2 FROM TBL WHERE CODTBL = 'zon' AND CLETBL = 'PRO&lt;B&gt;001&lt;/B&gt;'&lt;/P&gt;&lt;P&gt;=&amp;gt; LIB1 = 'Manufacturing country' / LIB2 = '&lt;B&gt;002&lt;/B&gt;'&lt;/P&gt;&lt;P&gt;SELECT LIB1, LIB2 FROM TBL WHERE CODTBL = '&lt;B&gt;002&lt;/B&gt;' AND CLETBL = '&lt;B&gt;FR&lt;/B&gt;'&lt;/P&gt;&lt;P&gt;=&amp;gt; LIB1 = 'France' / LIB2 = 'République française'&lt;/P&gt;&lt;P&gt;This way, I am able to say Manufacturing country of product 000001 is France, instead of CODZN1 of product 000001 is FR.&lt;/P&gt;&lt;P&gt;I can do the job manually for all CODZNxx in my database. But this database is the same for several customers, so I'd like to find a way to automate the creation of LIST objects which allow me to filter the products using friendly name and values of the CODZNxx fields.&lt;/P&gt;&lt;P&gt;For some customers, CODZN1 will be the manufacturing coutry, for some others, it will be a flag to make the product visible on the website, for others it will be the energy score of the product, etc. and I'd prefer to automate this rather than re-creating each time all the list items.&lt;/P&gt;&lt;P&gt;Is there a way to do this ? I looked arround, but I can't find how to do this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2011 16:25:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-there-a-way-to-dynamicaly-create-objects-from-data-values/m-p/172257#M41868</guid>
      <dc:creator />
      <dc:date>2011-03-21T16:25:41Z</dc:date>
    </item>
    <item>
      <title>Is there a way to dynamicaly create objects from data values ?</title>
      <link>https://community.qlik.com/t5/QlikView/Is-there-a-way-to-dynamicaly-create-objects-from-data-values/m-p/172258#M41869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can build your "LOAD" statement as a string and assign it to a variable, and then execute the statement using $() - expansion. FOr example:&lt;/P&gt;&lt;P&gt;LET vLoad = 'SELECT A, B, C FROM ...';&lt;/P&gt;&lt;P&gt;$(vLoad)&lt;/P&gt;&lt;P&gt;Word of caution - you might run into problems with single quotes inside of your string. Sometimes you'll have to concatenate a CHR(39) instead of simply typing a single quote...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2011 16:40:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-there-a-way-to-dynamicaly-create-objects-from-data-values/m-p/172258#M41869</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2011-03-21T16:40:52Z</dc:date>
    </item>
    <item>
      <title>Is there a way to dynamicaly create objects from data values ?</title>
      <link>https://community.qlik.com/t5/QlikView/Is-there-a-way-to-dynamicaly-create-objects-from-data-values/m-p/172259#M41870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;My main problem isn't really the SQL query building. Even without variables, I should be able to deal with the data structure.&lt;/P&gt;&lt;P&gt;What I'm looking for is a macro or something like that, which will create my list objects correctly named according the TBL values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2011 08:09:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-there-a-way-to-dynamicaly-create-objects-from-data-values/m-p/172259#M41870</guid>
      <dc:creator />
      <dc:date>2011-03-22T08:09:03Z</dc:date>
    </item>
    <item>
      <title>Is there a way to dynamicaly create objects from data values ?</title>
      <link>https://community.qlik.com/t5/QlikView/Is-there-a-way-to-dynamicaly-create-objects-from-data-values/m-p/172260#M41871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mean something like that (pseudo-code)&lt;/P&gt;&lt;P&gt;SET posX = 50;&lt;BR /&gt;SET posY = 10;&lt;BR /&gt;SET Width = 150;&lt;BR /&gt;SET Height = 100;&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;for i = 1 to 16&lt;/B&gt;&lt;BR /&gt; &lt;B&gt;Codzn$(i)Values:&lt;/B&gt;&lt;BR /&gt; LOAD&lt;BR /&gt; SQL select tbl1.cletbl, tbl1.lib1&lt;BR /&gt; from tbl tbl1&lt;BR /&gt; inner join tbl tbl2 on tbl2.lib2 = tbl1.codtbl&lt;BR /&gt; where tbl2.codtbl = 'zon' and tbl2.cletbl = 'PRO0$(left('0' &amp;amp; i, 2))';&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;Codzn$(i)Name:&lt;/B&gt;&lt;BR /&gt; SQL select tbl.lib1 from tbl where codtbl = 'zon' and cletbl = 'PRO0$(left('0' &amp;amp; i, 2))';&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;CreateListObject(Sheet1, Posx, Posy, Width, Height, Codzn$(i)Name, Codzn$(i)Values);&lt;/B&gt;&lt;BR /&gt; LET PosY = PosY + 150;&lt;BR /&gt;next&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2011 09:00:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-there-a-way-to-dynamicaly-create-objects-from-data-values/m-p/172260#M41871</guid>
      <dc:creator />
      <dc:date>2011-03-22T09:00:19Z</dc:date>
    </item>
  </channel>
</rss>

