<?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: a dynamic variable in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556950#M40544</link>
    <description>&lt;P&gt;Good Morning everybody.&lt;BR /&gt;i have tested your Script and it doesn´t work. the evaluate() function returns NULL for every entry.&lt;BR /&gt;I don´t know why. These all are Text Fields from Excel.&lt;BR /&gt;&lt;BR /&gt;I have tested my script again and it works. Except for two columns with an "/" in it. this won´t work when i concat the filds of a row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i will thank you for your help and hope you can give me a hint to the solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;best regards&lt;/P&gt;</description>
    <pubDate>Fri, 15 Mar 2019 07:34:55 GMT</pubDate>
    <dc:creator>FrankTheTank</dc:creator>
    <dc:date>2019-03-15T07:34:55Z</dc:date>
    <item>
      <title>a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556573#M40400</link>
      <description>&lt;P&gt;hello everybody &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;i would generate a generic variable. is it possible to name the variable in step of a for next statement by the step?&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 13:56:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556573#M40400</guid>
      <dc:creator>FrankTheTank</dc:creator>
      <dc:date>2019-03-14T13:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556628#M40423</link>
      <description>&lt;P&gt;I would say yes - did you try it?&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 15:18:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556628#M40423</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-03-14T15:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556631#M40424</link>
      <description>&lt;P&gt;of course &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; forgive me my imprecise question.&lt;BR /&gt;how can I make a variable number so dynamic that I get number1, number2, number3, and so on.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 15:24:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556631#M40424</guid>
      <dc:creator>FrankTheTank</dc:creator>
      <dc:date>2019-03-14T15:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556637#M40426</link>
      <description>&lt;P&gt;I few more details to which input should results in which output would be really useful - do you mean something like:&lt;/P&gt;&lt;P&gt;for i = 1 to 5&lt;BR /&gt;&amp;nbsp;&amp;nbsp; let Number$(i) = $(i);&lt;BR /&gt;next&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 15:29:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556637#M40426</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-03-14T15:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556647#M40427</link>
      <description>&lt;P&gt;Yeah, kind of like that. I read all the fields of a line from a table and join them into a string to make it a hash. I would like to do this for every line of the table and I wanted to save the hash values ​​per line in a dynamically named variable and then put them in a table.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 15:36:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556647#M40427</guid>
      <dc:creator>FrankTheTank</dc:creator>
      <dc:date>2019-03-14T15:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556665#M40434</link>
      <description>&lt;P&gt;Ok. all fieldvalues of a record should be string-concatenated and then be hashed - and for what is here a variable needed?&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 15:52:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556665#M40434</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-03-14T15:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556672#M40436</link>
      <description>&lt;PRE&gt;set vTable = 'Test';
set vFile = 'Test.XLSX';
let vFileName = Replace(SubField('$(vFile)','/',-1),'.XLSX','');
let vFileDate = FileTime('$(vFile)');

[$(vTable)]:
LOAD
*
FROM [$(vSource)/$(vFile)]
(ooxml, embedded labels);

Let vFieldsConcatenated=;

FOR i = 1 to NoOfFields('$(vTable)')
Fields:
LOAD
FieldName($(i),'$(vTable)') AS FieldName
AutoGenerate 1
;
Let vFieldsConcatenated='$(vFieldsConcatenated)'&amp;amp;If($(i)&amp;gt;1,',')&amp;amp;Peek('FieldName');
NEXT i

Object:
LOAD
*,
'$(vHash)' as HashMkeyNum,
today() as TS
Resident [$(vTable)];
drop table [$(vTable)];&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;I now thought that I somehow calculate the hash value for each line and store it in a variable to load it later into the table. Or am I wrong?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 15:58:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556672#M40436</guid>
      <dc:creator>FrankTheTank</dc:creator>
      <dc:date>2019-03-14T15:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556713#M40453</link>
      <description>&lt;P&gt;I must admit that I could not completely comprehend your logic where and why you want to create multiple variables which then should contain the hashes and should be then loaded into a table. I wouldn't do that else I would try to create everything possible within a table-load (and this is for me a general approach and often much easier than the variable-handling) and applying the hash-logic directly within the origin load. Maybe with something like this:&lt;/P&gt;&lt;P&gt;t1: first 1 LOAD * FROM [export.XLSX] (ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;t2: load peek('F') &amp;amp; '[' &amp;amp; evaluate('fieldname(' &amp;amp; recno() &amp;amp; ', ''t1'')') &amp;amp; ']' &amp;amp; if(recno() &amp;lt; nooffields('t1'), '&amp;amp;''|''&amp;amp;') as F&lt;BR /&gt;autogenerate nooffields('t1');&lt;/P&gt;&lt;P&gt;let h = peek('F', -1, 't2'); drop tables t1, t2;&lt;/P&gt;&lt;P&gt;t3: load recno() as RecNo, hash256($(h)) as Hash, autonumberhash256($(h)) as Autonumberhash&lt;BR /&gt;from [export.XLSX] (ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 16:59:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556713#M40453</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-03-14T16:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556726#M40455</link>
      <description>i will think over it tomorrow and will reply you what my problems are.&lt;BR /&gt;thanks</description>
      <pubDate>Thu, 14 Mar 2019 17:19:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556726#M40455</guid>
      <dc:creator>FrankTheTank</dc:creator>
      <dc:date>2019-03-14T17:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556950#M40544</link>
      <description>&lt;P&gt;Good Morning everybody.&lt;BR /&gt;i have tested your Script and it doesn´t work. the evaluate() function returns NULL for every entry.&lt;BR /&gt;I don´t know why. These all are Text Fields from Excel.&lt;BR /&gt;&lt;BR /&gt;I have tested my script again and it works. Except for two columns with an "/" in it. this won´t work when i concat the filds of a row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i will thank you for your help and hope you can give me a hint to the solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;best regards&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 07:34:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556950#M40544</guid>
      <dc:creator>FrankTheTank</dc:creator>
      <dc:date>2019-03-15T07:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556961#M40546</link>
      <description>&lt;P&gt;For me with QV 11.2 it worked. With another release the handling of fieldname() and/or with the quotes might have slightly changed and the workaround with evaluate() might be now unnecessary - are you sure that you took my code-snippet 1:1? If not there might be a small syntax-issue.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 07:54:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556961#M40546</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-03-15T07:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556970#M40548</link>
      <description>&lt;P&gt;yes, I only changed the source. But I use Qlik Sense. does it matter?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 08:17:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1556970#M40548</guid>
      <dc:creator>FrankTheTank</dc:creator>
      <dc:date>2019-03-15T08:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1557007#M40550</link>
      <description>&lt;P&gt;The general workings should be the same but the release (of the engine) is surely different. I don't know if it's in your case worth to search for the cause - maybe it's just the legacy-mode or something similar - but I'm sure that these logic could be applied.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 09:21:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1557007#M40550</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-03-15T09:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1557014#M40552</link>
      <description>&lt;P&gt;i have testet your script without the evaluate function.&lt;/P&gt;&lt;P&gt;the same Problem.&lt;/P&gt;&lt;PRE&gt;t1:
first 1 LOAD * FROM [lib://OjO/OJO.XLSX](ooxml, embedded labels, table is OJO);


t2:
load peek('F') &amp;amp; '[' &amp;amp;
    	fieldname(' &amp;amp; recno() &amp;amp; ', 't1')
        &amp;amp; ']' &amp;amp; 
    if(recno() &amp;lt; nooffields('t1'), '&amp;amp;"|"&amp;amp;') as F
autogenerate nooffields('t1');&lt;/PRE&gt;&lt;P&gt;to see what is in 'F'.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 848px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/8110iC6928A503E4814C3/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 09:30:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1557014#M40552</guid>
      <dc:creator>FrankTheTank</dc:creator>
      <dc:date>2019-03-15T09:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1557061#M40555</link>
      <description>&lt;P&gt;For me it&amp;nbsp; worked:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FieldnameWithEvaluate.JPG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/8118i6E0B60717C911996/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FieldnameWithEvaluate.JPG" alt="FieldnameWithEvaluate.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Before going further just check if the normal fieldname() function itself worked, with:&lt;/P&gt;&lt;P&gt;fieldname(1, 't1')&lt;/P&gt;&lt;P&gt;if yes, try it with:&lt;/P&gt;&lt;P&gt;fieldname(recno(), 't1') and then with:&lt;/P&gt;&lt;P&gt;fieldname(evaluate(recno()), 't1') or fieldname(eavluate('recno()'), 't1')&lt;/P&gt;&lt;P&gt;and if this don't worked with:&lt;/P&gt;&lt;P&gt;evaluate('fieldname(' &amp;amp; recno() &amp;amp; ', ''t1'')')&lt;/P&gt;&lt;P&gt;whereby the exact use of the quotes is important. An alternatively to the last could be:&lt;/P&gt;&lt;P&gt;evaluate('fieldname(' &amp;amp; recno() &amp;amp; ',' &amp;amp; chr(39) &amp;amp; 't1' &amp;amp; chr(39) &amp;amp; ')')&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 10:14:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1557061#M40555</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-03-15T10:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1557157#M40560</link>
      <description>&lt;P&gt;&lt;SPAN&gt;fieldname(1, 't1') =&amp;gt; works&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;fieldname(recno(), 't1') =&amp;gt; works&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;fieldname(evaluate(recno()), 't1') =&amp;gt; works&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;fieldname(evaluate('recno()'), 't1') =&amp;gt; everything is NULL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;evaluate('fieldname(' &amp;amp; recno() &amp;amp; ', ''t1'')') =&amp;gt; every entry is "F"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;evaluate('fieldname(' &amp;amp; recno() &amp;amp; ',' &amp;amp; chr(39) &amp;amp; 't1' &amp;amp; chr(39) &amp;amp; ')') =&amp;gt; works&lt;BR /&gt;&lt;BR /&gt;if I take the last way in your script in further steps i get an error.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 593px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/8134i4845F063EB3EDB53/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/8135iE95381F6EB43BE00/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 12:07:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1557157#M40560</guid>
      <dc:creator>FrankTheTank</dc:creator>
      <dc:date>2019-03-15T12:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1557243#M40566</link>
      <description>&lt;P&gt;This is the desired approach:&lt;/P&gt;&lt;P&gt;fieldname(recno(), 't1')&lt;/P&gt;&lt;P&gt;and everything else with the evaluate-stuff was just a workaround for a seemingly strange bug/feature in 11.2.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 14:21:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1557243#M40566</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-03-15T14:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1557660#M40610</link>
      <description>&lt;P&gt;OK. But if I continue to use that is the error shown by me. what do I do about it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But thank you in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 07:58:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1557660#M40610</guid>
      <dc:creator>FrankTheTank</dc:creator>
      <dc:date>2019-03-18T07:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1557891#M40616</link>
      <description>&lt;P&gt;Which error - the above one from the screenshot? If yes it meant that the record-check within field-concat - recno() vs. nooffields() - didn't work properly. Why I don't know - but could it be that Qlik tries to load a column with a blank fieldname (this happens if there is any content within any record of this column).&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 13:14:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1557891#M40616</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-03-18T13:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: a dynamic variable</title>
      <link>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1558007#M40626</link>
      <description>&lt;P&gt;Yes, exactly this mistake. And yes, there is content in the columns. For each column, the program also does, for more than one column bicht. Is this due to a faulty understanding?&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 15:39:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/a-dynamic-variable/m-p/1558007#M40626</guid>
      <dc:creator>FrankTheTank</dc:creator>
      <dc:date>2019-03-18T15:39:39Z</dc:date>
    </item>
  </channel>
</rss>

