<?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 concat field and variable for a function parameter in fieldindex in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/concat-field-and-variable-for-a-function-parameter-in-fieldindex/m-p/1811887#M66222</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I need to concatenate a variable and a field value to be used inside a FieldIndex and then in a Peek function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let t = date#('2021-03-18');

DQ_FACTS_QVD_INI_AUX:
LOAD 
DQ_ID,
FieldIndex('DQ_FACTS_ID_WITH_DATE', "DQ_FACTS_ID"&amp;amp;'$(t)')-1 as FINDEX, 
Peek('DQ_FACTS_ID_WITH_DATE',FieldIndex('DQ_FACTS_ID_WITH_DATE', "DQ_FACTS_ID"&amp;amp;'$(t)')-1,'DQ_FACTS_QVD_INI') as DQ_FACTS_ID_WITH_DATE
Resident DQ_FACTS_QVD_INI;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that FieldIndex(...) is not returning the correct position, it returns a position, but not the correct one... I don't know how is&amp;nbsp;"DQ_FACTS_ID"&amp;amp;'$(t)' getting composed.&lt;/P&gt;&lt;P&gt;Thaks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 31 May 2021 16:40:08 GMT</pubDate>
    <dc:creator>Morgoz</dc:creator>
    <dc:date>2021-05-31T16:40:08Z</dc:date>
    <item>
      <title>concat field and variable for a function parameter in fieldindex</title>
      <link>https://community.qlik.com/t5/App-Development/concat-field-and-variable-for-a-function-parameter-in-fieldindex/m-p/1811887#M66222</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I need to concatenate a variable and a field value to be used inside a FieldIndex and then in a Peek function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let t = date#('2021-03-18');

DQ_FACTS_QVD_INI_AUX:
LOAD 
DQ_ID,
FieldIndex('DQ_FACTS_ID_WITH_DATE', "DQ_FACTS_ID"&amp;amp;'$(t)')-1 as FINDEX, 
Peek('DQ_FACTS_ID_WITH_DATE',FieldIndex('DQ_FACTS_ID_WITH_DATE', "DQ_FACTS_ID"&amp;amp;'$(t)')-1,'DQ_FACTS_QVD_INI') as DQ_FACTS_ID_WITH_DATE
Resident DQ_FACTS_QVD_INI;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that FieldIndex(...) is not returning the correct position, it returns a position, but not the correct one... I don't know how is&amp;nbsp;"DQ_FACTS_ID"&amp;amp;'$(t)' getting composed.&lt;/P&gt;&lt;P&gt;Thaks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 16:40:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/concat-field-and-variable-for-a-function-parameter-in-fieldindex/m-p/1811887#M66222</guid>
      <dc:creator>Morgoz</dc:creator>
      <dc:date>2021-05-31T16:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: concat field and variable for a function parameter in fieldindex</title>
      <link>https://community.qlik.com/t5/App-Development/concat-field-and-variable-for-a-function-parameter-in-fieldindex/m-p/1811969#M66230</link>
      <description>&lt;P&gt;It's not quite clear what do you want to achieve? The cause of the unexpected results is probably that you mix two quite different functions because fieldindex() is running against the (distinct values) within the system-tables and peek() fetched the results from the data-tables. Both tables are linked through a bit-stuffed pointer. Probably there aren't many scenarios in which you may mix up both logics - maybe if both table-areas contain the same number of distinct values otherwise you will need different approaches to get your data - maybe lookup() ?&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 07:44:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/concat-field-and-variable-for-a-function-parameter-in-fieldindex/m-p/1811969#M66230</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-06-01T07:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: concat field and variable for a function parameter in fieldindex</title>
      <link>https://community.qlik.com/t5/App-Development/concat-field-and-variable-for-a-function-parameter-in-fieldindex/m-p/1812248#M66274</link>
      <description>&lt;P&gt;Thank you very much Marcus,&lt;/P&gt;&lt;P&gt;with Lookup function it works perfect.&lt;/P&gt;&lt;P&gt;Sorry for the newbe question, but just to try to understand it better, what do you mean by "system-tables" and "data-tables"? Just want to understand where are FieldIndex and Peek exactly looking for the data.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 21:51:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/concat-field-and-variable-for-a-function-parameter-in-fieldindex/m-p/1812248#M66274</guid>
      <dc:creator>Morgoz</dc:creator>
      <dc:date>2021-06-01T21:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: concat field and variable for a function parameter in fieldindex</title>
      <link>https://community.qlik.com/t5/App-Development/concat-field-and-variable-for-a-function-parameter-in-fieldindex/m-p/1812295#M66284</link>
      <description>&lt;P&gt;Here you will find some background how the data are handled internally:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Documents/Symbol-Tables-and-Bit-Stuffed-Pointers-a-deeper-look-behind-the/ta-p/1490433" target="_blank"&gt;Symbol Tables and Bit-Stuffed Pointers - a deeper ... - Qlik Community - 1490433&lt;/A&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 06:56:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/concat-field-and-variable-for-a-function-parameter-in-fieldindex/m-p/1812295#M66284</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-06-02T06:56:58Z</dc:date>
    </item>
  </channel>
</rss>

