<?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: Issue in Section Access in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Issue-in-Section-Access/m-p/23363#M785981</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A _jive_internal="true" data-avatarid="9506" data-externalid="" data-online="false" data-presence="null" data-userid="27943" data-username="marcus_sommer" href="https://community.qlik.com/people/marcus_sommer" style="font-weight: bold; font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #8b8b8b; background-color: #f2f2f2;"&gt;Marcus Sommer&lt;/A&gt; maybe &lt;SPAN style="font-size: 11.7px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;A href="https://community.qlik.com/people/pcammaert"&gt;pcammaert&lt;/A&gt;&amp;nbsp; can help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;SPAN class="icon-status-icon icon-mvp" style="margin: 0 0 0 4px; font-weight: inherit; font-style: inherit; font-size: 11.7px; font-family: inherit;" title="Mvp"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Feb 2018 05:39:58 GMT</pubDate>
    <dc:creator>Chanty4u</dc:creator>
    <dc:date>2018-02-28T05:39:58Z</dc:date>
    <item>
      <title>Issue in Section Access</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-Section-Access/m-p/23362#M785980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have implemented section access in my application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I execute the script I am facing the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code is given below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR i = 1 to $(vL.Reduction_Field_Count) //Basic for loop using the counter we generated earlier&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Join join our table here as part of the loop and dyunaically build the fieldname based on &lt;/P&gt;&lt;P&gt;//our variables&lt;/P&gt;&lt;P&gt;LEFT JOIN(GROUP_TABLE_temp)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;ACCESS As Access_1&lt;/P&gt;&lt;P&gt;//,NTNAME As GROUP&lt;/P&gt;&lt;P&gt;,COMBINED_NAME AS NtName_1&lt;/P&gt;&lt;P&gt;,REDUCTION_FIELD_VALUE AS $(vL.Reduction_Field_Name$(i))&lt;/P&gt;&lt;P&gt;RESIDENT SECTION_ACCESS_TEMP&lt;/P&gt;&lt;P&gt;WHERE REDUCTION_FIELD ='$(vL.Reduction_Field_Name$(i))';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//At the sametime on our loop, we'll create some useful fields for later&lt;/P&gt;&lt;P&gt;//to give us the list of different table fieldnames, end datamodel field name&lt;/P&gt;&lt;P&gt;//and field numbers. These will all be used later to dynamically build the end table&lt;/P&gt;&lt;P&gt;REDUCTION_FIELDLIST:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;'$(vL.Reduction_Field_Name$(i))' AS FIELDLIST&lt;/P&gt;&lt;P&gt;,'$(vL.DataModel_Reduction_Field_Name$(i))' AS DATAMODEL_FIELDLIST&lt;/P&gt;&lt;P&gt;,$(i) AS FIELD_NO&lt;/P&gt;&lt;P&gt;AUTOGENERATE 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEXT i;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE SECTION_ACCESS_TEMP; //Drop no longer needed temp tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error which I am facing as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2018-02-27 16:38:25 0211&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AUTOGENERATE 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2018-02-27 16:38:25&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; 3 fields found: FIELDLIST, DATAMODEL_FIELDLIST, FIELD_NO, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2018-02-27 16:38:25&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 lines fetched&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2018-02-27 16:38:25 0213 NEXT i&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2018-02-27 16:38:25&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Error: Unexpected token: 'SECTION_ACCESS_TEMP', expected one of: ',', 'AutoGenerate', 'From', 'From_Field', 'Inline', 'Resident', 'Where', ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2018-02-27 16:38:25&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Execution Failed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2018-02-27 16:38:25&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Execution finished. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;SK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-Section-Access/m-p/23362#M785980</guid>
      <dc:creator>kicchu465</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in Section Access</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-Section-Access/m-p/23363#M785981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A _jive_internal="true" data-avatarid="9506" data-externalid="" data-online="false" data-presence="null" data-userid="27943" data-username="marcus_sommer" href="https://community.qlik.com/people/marcus_sommer" style="font-weight: bold; font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #8b8b8b; background-color: #f2f2f2;"&gt;Marcus Sommer&lt;/A&gt; maybe &lt;SPAN style="font-size: 11.7px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;A href="https://community.qlik.com/people/pcammaert"&gt;pcammaert&lt;/A&gt;&amp;nbsp; can help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;SPAN class="icon-status-icon icon-mvp" style="margin: 0 0 0 4px; font-weight: inherit; font-style: inherit; font-size: 11.7px; font-family: inherit;" title="Mvp"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 05:39:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-Section-Access/m-p/23363#M785981</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2018-02-28T05:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in Section Access</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-Section-Access/m-p/23364#M785982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume that the loop didn't worked as expected and I would probably use some trace-statements to find where it breaks and how there the content of the variables look like. I mean something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;trace $(i) - '$(vL.Reduction_Field_Name$(i))';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 09:25:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-Section-Access/m-p/23364#M785982</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-02-28T09:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in Section Access</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-Section-Access/m-p/23365#M785983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aside from the golden tip by Marcus about how to find out what goes wrong during loop execution 3, you can fairly easily reconstruct the code that the script engine tries to parse (and that is giving it a fit). Consider this train of thought:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The script engine complains about encountering token SECTION_ACCESS_TEMP in the spot where it expects either a semicolon (indicating a Preceding Load) or a data source keyword.&lt;/LI&gt;&lt;LI&gt;However, the statement &lt;EM&gt;does&lt;/EM&gt; have a RESIDENT keyword. Then why isn't this keyword treated for what it means: &lt;EM&gt;read from a Resident table&lt;/EM&gt; ?&lt;/LI&gt;&lt;LI&gt;That's probably because the RESIDENT keyword itself is in the wrong spot, more precisely it is being eaten as something else. Remember that QlikView Script language doesn't really have reserved words! QlikView Script is a highly ambiguous language. What a word like RESIDENT will mean, depends on where the script engine finds it. It can be a table name, a variable name, a data source keyword, and ... &lt;EM&gt;the name of a new column&lt;/EM&gt;...&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="text-decoration: underline;"&gt;And there you have it&lt;/SPAN&gt;: if the script engine thinks that SECTION_ACCESS_TEMP should be a data source keyword, then this means that the actual RESIDENT word is eaten as part of the previous expression.&lt;/LI&gt;&lt;LI&gt;But why does the script engine add RESIDENT to the previous expression that creates - of all things - a new column? Usually (99.99% of all cases) that is because your $-sign expansion expands to ... nothing at all. Your statement then ends with &lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;, REDUCTION_FIELD_VALUE AS RESIDENT SECTION_ACCESS_TEMP WHERE ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt; And because RESIDENT is a perfectly valid name for a new field/column, you don't get any complaints there. But the SECTION_ACCESS_TEMP token will be unexpected. Compilers and interpreters have a hard time figuring out where the actual error is. Often they only report the consequences which may be located a distance away.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW that's also why Marcus' tip will save your day &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 16:58:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-Section-Access/m-p/23365#M785983</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2018-02-28T16:58:18Z</dc:date>
    </item>
  </channel>
</rss>

