<?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: Peek function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Peek-function/m-p/861733#M656614</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apparently I am many creating many duplicate records, I will try to figure that out first. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Jun 2015 11:32:00 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-06-10T11:32:00Z</dc:date>
    <item>
      <title>Peek function</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-function/m-p/861729#M656610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use an incremental load to load 3 reports into qlikview. I have written my code so that a table is created with the reports from the latest date for which all reports are available. The table looks like this (in order of loading):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; report category&lt;/P&gt;&lt;P&gt;filename1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category1&lt;/P&gt;&lt;P&gt;filename2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category2&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;filename3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Category3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my script I write the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vReport1=peek('file',fieldindex('rapport','Category1'),'table1')&lt;/P&gt;&lt;P&gt;let vReport2=peek('file',fieldindex('rapport','Category2'),'table1')&lt;/P&gt;&lt;P&gt;let vReport3=peek('file',fieldindex('rapport','Category3'),'table1')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would think this code gives me the filename of the file that I want to load, but apparently every vReport leads to the same result; it always results in filename3, even though the fieldindex formula returns a different number. What am I doing wrong here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 10:20:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-function/m-p/861729#M656610</guid>
      <dc:creator />
      <dc:date>2015-06-10T10:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-function/m-p/861730#M656611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do the fieldindex() functions return as value for each call?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And what does this return as variables value:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;let vReport1=peek('file',0,'table1');&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;let vReport2=peek('file',1,'table1');&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;let vReport3=peek('file',2,'table1');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Does your Table1 only holds three records or duplicate records per file?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 10:25:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-function/m-p/861730#M656611</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-10T10:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-function/m-p/861731#M656612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;fieldindex('rapport,'Category1') yields value 1&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;fieldindex('rapport,'Category2') yields value 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;fieldindex('rapport,'Category3') yields value 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Table1 only has the 2 fields that I described, filename and category&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Please note that I loaded category as right(filename, 6), since the last bit of the filename describes to which category it belongs. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;When I load table1 and create a table object, I see no duplicate values. Just the 3 file names and their respective categories. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;vReport1=peek('file'0,'table1) also yields filename3. No matter which number I use as a row number in the peek function, it returns the same filename. Even when I use 10, even though there are only supposed to be 3 rows in my table.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 10:34:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-function/m-p/861731#M656612</guid>
      <dc:creator />
      <dc:date>2015-06-10T10:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-function/m-p/861732#M656613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The table box won't show duplicate records. If you open table view CTRL-T, and open preview of that table 1, only 3 distinct records are shown?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you are creating duplicate records in your table 1 creation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also note the different indexing start value for peek( zero) vs fieldindex( one ).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 10:41:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-function/m-p/861732#M656613</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-10T10:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-function/m-p/861733#M656614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apparently I am many creating many duplicate records, I will try to figure that out first. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 11:32:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-function/m-p/861733#M656614</guid>
      <dc:creator />
      <dc:date>2015-06-10T11:32:00Z</dc:date>
    </item>
  </channel>
</rss>

