<?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: sanity check... in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/sanity-check/m-p/447036#M699135</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am nat able to get it ?? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jan 2013 09:43:15 GMT</pubDate>
    <dc:creator>sujeetsingh</dc:creator>
    <dc:date>2013-01-23T09:43:15Z</dc:date>
    <item>
      <title>sanity check...</title>
      <link>https://community.qlik.com/t5/QlikView/sanity-check/m-p/447035#M699132</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;I have a table with 5 values, and I need to concatenate those values forming a string. Since I am going to use this string to load from a table, the 5 values actually represent field names so I need to put them into brackets, because there are spaces in the names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I thought of looping through the table and construct the string like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET sectionAccessKeyFields='';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR currentFieldNameIndex=1 TO FIELDVALUECOUNT('KeyField')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LET currentFieldName=FIELDVALUE('KeyField',$(currentFieldNameIndex));&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SET sectionAccessKeyFields=$(sectionAccessKeyFields)[$(currentFieldName)];&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The strange thing is that brackets for 1st field seem to just disappear (see red arrows in image) but not for the next 4 fields. I have found a workaround for this, so I need NOT a solution, merely an explanation why this is happening. The workaround I came up with is to start from a non-empty string. but do you have any idea as WHY this is happening? I have attached a file with both the problem and the workaround.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="31595" class="jive-image-thumbnail jive-image" onclick="" alt="2013-01-23_1124.png" src="https://community.qlik.com/legacyfs/online/31595_2013-01-23_1124.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your time.&lt;/P&gt;&lt;P&gt;Ioannis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 09:36:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sanity-check/m-p/447035#M699132</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2013-01-23T09:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: sanity check...</title>
      <link>https://community.qlik.com/t5/QlikView/sanity-check/m-p/447036#M699135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am nat able to get it ?? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 09:43:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sanity-check/m-p/447036#M699135</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2013-01-23T09:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: sanity check...</title>
      <link>https://community.qlik.com/t5/QlikView/sanity-check/m-p/447037#M699137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure what you mean... you did not understand the problem or...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 10:41:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sanity-check/m-p/447037#M699137</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2013-01-23T10:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: sanity check...</title>
      <link>https://community.qlik.com/t5/QlikView/sanity-check/m-p/447038#M699139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ioannis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like Qlikview is stripping off the square brackets when it picks up the first pass, probably because they are a reserved character in Qlikview language.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see this in action ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET sectionAccessKeyFields3=[PRODUCT TYPE ID];&lt;/P&gt;&lt;P&gt;SET sectionAccessKeyFields4=[PRODUCT TYPE ID][REGION ID];&lt;/P&gt;&lt;P&gt;SET sectionAccessKeyFields5=$(sectionAccessKeyFields3)[REGION ID];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The middle variable works fine, but the last variable strips off the brackets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tend to use LET instead of SET when building strings so as to avoid confusion ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET sectionAccessKeyFields=;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR currentFieldNameIndex=1 TO FIELDVALUECOUNT('KeyField')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET currentFieldName=FIELDVALUE('KeyField',$(currentFieldNameIndex));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET sectionAccessKeyFields='$(sectionAccessKeyFields)' &amp;amp; '[' &amp;amp; '$(currentFieldName)' &amp;amp; ']';&lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;flipside&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 10:49:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sanity-check/m-p/447038#M699139</guid>
      <dc:creator>flipside</dc:creator>
      <dc:date>2013-01-23T10:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: sanity check...</title>
      <link>https://community.qlik.com/t5/QlikView/sanity-check/m-p/447039#M699141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi flipside.&lt;/P&gt;&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;My guess also, brackets being a reserved character, but why does not the same apply to the second and subsequent pass? This is what really troubles me.&lt;/P&gt;&lt;P&gt;Ioannis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 11:00:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sanity-check/m-p/447039#M699141</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2013-01-23T11:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: sanity check...</title>
      <link>https://community.qlik.com/t5/QlikView/sanity-check/m-p/447040#M699143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; KeyField&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PRODUCT TYPE ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; REGION ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AREA ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUBSALESUNIT ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACCOUNT ID&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//This makes the brackets for the 1st field disappear&lt;/P&gt;&lt;P&gt;SET sectionAccessKeyFields = '';&lt;/P&gt;&lt;P&gt;FOR currentFieldNameIndex=1 TO FIELDVALUECOUNT('KeyField')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET currentFieldName= '[' &amp;amp; FIELDVALUE('KeyField',$(currentFieldNameIndex)) &amp;amp; ']';&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET&amp;nbsp; sectionAccessKeyFields= sectionAccessKeyFields &amp;amp; currentFieldName;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 11:33:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sanity-check/m-p/447040#M699143</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-01-23T11:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: sanity check...</title>
      <link>https://community.qlik.com/t5/QlikView/sanity-check/m-p/447041#M699145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jagan.&lt;/P&gt;&lt;P&gt;thank you but I have found already a similar solution. I just need to know WHY QlikView behaves like this.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ioannis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 11:37:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sanity-check/m-p/447041#M699145</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2013-01-23T11:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: sanity check...</title>
      <link>https://community.qlik.com/t5/QlikView/sanity-check/m-p/447042#M699146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it is evaluation the value for the first time, I am not sure about this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 11:43:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sanity-check/m-p/447042#M699146</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-01-23T11:43:29Z</dc:date>
    </item>
  </channel>
</rss>

