<?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: Concatenated String as a Variable in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Concatenated-String-as-a-Variable/m-p/109798#M7524</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Figured it out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load &lt;BR /&gt;Concat(Chr(39) &amp;amp; Prefix &amp;amp; Chr(39),',') as PrefixList&lt;/P&gt;&lt;P&gt;Resident PrefixTable;&lt;/P&gt;&lt;P&gt;Drop Table Prefix Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vPrefixList = FieldValue('PrefixList',1);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Nov 2018 00:13:56 GMT</pubDate>
    <dc:creator>m_perreault</dc:creator>
    <dc:date>2018-11-06T00:13:56Z</dc:date>
    <item>
      <title>Concatenated String as a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Concatenated-String-as-a-Variable/m-p/109796#M7522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looping through a folder in which the naming convention of files is structured.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1_filename.xlsx&lt;/P&gt;&lt;P&gt;2_filename.xlsx&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;3_filename.xlsx&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;4_filename.xlsx&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I only want to load certain files from the folder so right now I have a conditional statement &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Each File in FileList('lib://Qlik Control Data/*.xlsx')&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;// create conditional statement to only load 1_filename.xlsx and 2_filename.xlsx&lt;/P&gt;&lt;P&gt;If Match(Right(Subfield('$(File)','_',1),4),'1','2') Then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;*&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;FROM ['$(File)']&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is CASHFLOWS)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;End If;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Next File;&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;This works well except for the fact I had to hard code 1 and 2 into my match statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would prefer to do is store 1,2 as a variable but I am unsure how to.&amp;nbsp; Prior to my loop, a table in the script is generated which identifies 1_filename.xlsx and 2_filename.xslx as the files that we want to be loaded. I.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;FileName&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Include&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Prefix&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;1_filename.xlsx&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Y&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;2_filename.xlsx&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Y&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;3_filename.xlsx&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;N&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;4_filename.xlsx&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;N&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using this table how could I create a variable in the script that stores the value '1,2'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2018 22:16:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Concatenated-String-as-a-Variable/m-p/109796#M7522</guid>
      <dc:creator>m_perreault</dc:creator>
      <dc:date>2018-11-05T22:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenated String as a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Concatenated-String-as-a-Variable/m-p/109797#M7523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I've gotten to this point&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've eliminated records where Include = N from my table and created the below loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vFilePrefix = FieldValueCount('Prefix'&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Do While i &amp;lt;= '$(vFilePrefix)'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;let i = 1;&lt;/P&gt;&lt;P&gt;let vTest = FieldValue('Prefix','$(i)');&lt;/P&gt;&lt;P&gt;let i = i+1;&lt;/P&gt;&lt;P&gt;loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this will give me the last possible value of Prefix, in this case 2.&amp;nbsp; Is it possible for me to append strings to an existing variable without wiping out the value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2018 22:49:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Concatenated-String-as-a-Variable/m-p/109797#M7523</guid>
      <dc:creator>m_perreault</dc:creator>
      <dc:date>2018-11-05T22:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenated String as a Variable</title>
      <link>https://community.qlik.com/t5/App-Development/Concatenated-String-as-a-Variable/m-p/109798#M7524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Figured it out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load &lt;BR /&gt;Concat(Chr(39) &amp;amp; Prefix &amp;amp; Chr(39),',') as PrefixList&lt;/P&gt;&lt;P&gt;Resident PrefixTable;&lt;/P&gt;&lt;P&gt;Drop Table Prefix Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vPrefixList = FieldValue('PrefixList',1);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2018 00:13:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Concatenated-String-as-a-Variable/m-p/109798#M7524</guid>
      <dc:creator>m_perreault</dc:creator>
      <dc:date>2018-11-06T00:13:56Z</dc:date>
    </item>
  </channel>
</rss>

