<?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 fill variable from table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172145#M41813</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David, hi Gordon,&lt;/P&gt;&lt;P&gt;what do you think about input fields ? You can use wildards for the declaring and load them with the defaults you want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Inputfield Type;&lt;BR /&gt;Tbl:&lt;BR /&gt;Load * inline&lt;BR /&gt;[Val, Type&lt;BR /&gt;10, A&lt;BR /&gt;100, A&lt;BR /&gt;1000, A&lt;BR /&gt;20, B&lt;BR /&gt;50, C&lt;BR /&gt;500, C&lt;BR /&gt;220, D&lt;BR /&gt;100, D&lt;BR /&gt;];&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;RR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Nov 2010 14:53:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-11-04T14:53:11Z</dc:date>
    <item>
      <title>fill variable from table</title>
      <link>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172142#M41810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;I have several variables in which a user can provide a number from 0 till 50, the variables are: A1, B1, C1 .&lt;BR /&gt;In a chart this variable is used to perform a calculation.&lt;BR /&gt;In the data i also have a table which has values voor A1, B1, C1, i would like to use those values as the default value for my variables but i don't know how to..&lt;/P&gt;&lt;P&gt;I was thinkin' something like this but it doesn't work...&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;BR /&gt;&lt;BR /&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;&lt;/P&gt;&lt;I&gt;&lt;/I&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;for&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;Each record in OPNAME_AFDELING&lt;BR /&gt;&lt;B&gt;If&lt;/B&gt;(OPNMUTAFDELING='A1', &lt;B&gt;LET&lt;/B&gt; &lt;B&gt;&lt;I&gt;A1&lt;/I&gt;&lt;/B&gt; = OPNMUTAFDELINGBeddenaantal&lt;B&gt;)&lt;/B&gt;;&lt;BR /&gt;&lt;B&gt;next&lt;/B&gt; &lt;B&gt;record&lt;/B&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;for Each record in OPNAME_AFDELING&lt;BR /&gt;If(OPNMUTAFDELING='B1', LET &lt;I&gt;B1&lt;/I&gt; = OPNMUTAFDELINGBeddenaantal);&lt;BR /&gt;next record&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;help would be appriated!&lt;/P&gt;&lt;P&gt;thanx&lt;/P&gt;&lt;P&gt;david&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 12:41:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172142#M41810</guid>
      <dc:creator />
      <dc:date>2010-11-04T12:41:33Z</dc:date>
    </item>
    <item>
      <title>fill variable from table</title>
      <link>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172143#M41811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure I have understood but does this give you any ideas?&lt;/P&gt;&lt;P&gt;FOR i = 0 to NoOfRows('resident table')-1&lt;BR /&gt; LET vVariable$(i) = peek('fieldname', i, 'resident table');&lt;BR /&gt;NEXT ;&lt;/P&gt;&lt;P&gt;This will go through each row in a resident table and create a variable identified by the row number with the value of a field within that row.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 14:16:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172143#M41811</guid>
      <dc:creator />
      <dc:date>2010-11-04T14:16:14Z</dc:date>
    </item>
    <item>
      <title>fill variable from table</title>
      <link>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172144#M41812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gordon,&lt;/P&gt;&lt;P&gt;thanx for your reply, i copied your script in my script:&lt;BR /&gt;&lt;B&gt;FOR&lt;/B&gt; &lt;B&gt;i&lt;/B&gt; = 0 to NoOfRows('OPNAME_AFDELING')-1&lt;BR /&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;&lt;I&gt;vVariable$(i)&lt;/I&gt;&lt;/B&gt; = peek('OPNMUTAFDELINGBeddenaantal)', i, 'OPNAME_AFDELING');&lt;BR /&gt;&lt;B&gt;NEXT&lt;/B&gt;;&lt;/P&gt;&lt;P&gt;This made about 40 variables with a value from the table, it is allmost what i want, in my case the variables allready excist.&lt;BR /&gt;I would like to store the values in variables with names that are the same as another field in the table, is it possible to give the variable a name from another field from the table?&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;david&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 14:44:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172144#M41812</guid>
      <dc:creator />
      <dc:date>2010-11-04T14:44:18Z</dc:date>
    </item>
    <item>
      <title>fill variable from table</title>
      <link>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172145#M41813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David, hi Gordon,&lt;/P&gt;&lt;P&gt;what do you think about input fields ? You can use wildards for the declaring and load them with the defaults you want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Inputfield Type;&lt;BR /&gt;Tbl:&lt;BR /&gt;Load * inline&lt;BR /&gt;[Val, Type&lt;BR /&gt;10, A&lt;BR /&gt;100, A&lt;BR /&gt;1000, A&lt;BR /&gt;20, B&lt;BR /&gt;50, C&lt;BR /&gt;500, C&lt;BR /&gt;220, D&lt;BR /&gt;100, D&lt;BR /&gt;];&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;RR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 14:53:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172145#M41813</guid>
      <dc:creator />
      <dc:date>2010-11-04T14:53:11Z</dc:date>
    </item>
    <item>
      <title>fill variable from table</title>
      <link>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172146#M41814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi kurokarl,&lt;/P&gt;&lt;P&gt;in fact i have a tab where i have inputfields, the script above is to get the default values for the inputfields from a table..&lt;/P&gt;&lt;P&gt;does this help?&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;david&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 15:01:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172146#M41814</guid>
      <dc:creator />
      <dc:date>2010-11-04T15:01:10Z</dc:date>
    </item>
    <item>
      <title>fill variable from table</title>
      <link>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172147#M41815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just define another variable and peek the value into it, then use its content to create the variable name:&lt;/P&gt;&lt;P&gt;FOR i = 0 to NoOfRows('resident table')-1&lt;BR /&gt; LET vFieldValue = peek ('otherfieldname, i, 'resident table');&lt;BR /&gt; LET vVariable$(vFieldValue) = peek('fieldname', i, 'resident table');&lt;BR /&gt;NEXT ;&lt;/P&gt;&lt;P&gt;Of course the value in vFieldValue cannot contain a space or other reserved character as this is not allowed in a variable name (you could strip out the spaces using PurgeChar or Replace string functions though)&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 15:02:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172147#M41815</guid>
      <dc:creator />
      <dc:date>2010-11-04T15:02:32Z</dc:date>
    </item>
    <item>
      <title>fill variable from table</title>
      <link>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172148#M41816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Gordon,&lt;/P&gt;&lt;P&gt;this works! thanx.&lt;/P&gt;&lt;P&gt;Is it also possible to exclude some rows/variables?&lt;BR /&gt;Something like:&lt;/P&gt;&lt;P&gt;where OPNMUTAFDELINGLocatie = 'S'&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;david&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 15:28:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172148#M41816</guid>
      <dc:creator />
      <dc:date>2010-11-04T15:28:50Z</dc:date>
    </item>
    <item>
      <title>fill variable from table</title>
      <link>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172149#M41817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sure - you can make any lines of code conditional by wrapping them in IF..THEN..ELSE&lt;/P&gt;&lt;P&gt;IF A=0 THEN&lt;/P&gt;&lt;P&gt;(do something)&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 15:34:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172149#M41817</guid>
      <dc:creator />
      <dc:date>2010-11-04T15:34:01Z</dc:date>
    </item>
    <item>
      <title>fill variable from table</title>
      <link>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172150#M41818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanx for all help, the result is great..&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;david&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 16:01:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/fill-variable-from-table/m-p/172150#M41818</guid>
      <dc:creator />
      <dc:date>2010-11-04T16:01:37Z</dc:date>
    </item>
  </channel>
</rss>

