<?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: Load Script Section Name? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Load-Script-Section-Name/m-p/2543776#M109598</link>
    <description>&lt;P&gt;I don't know of any way to get the name of the current section in load script. You could set a variable manually at the top of each section.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Set vSectionName = Dictionary;&lt;/P&gt;&lt;P&gt;Trace 'Starting Section: $(vSectionName)';&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;</description>
    <pubDate>Wed, 25 Feb 2026 20:26:22 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2026-02-25T20:26:22Z</dc:date>
    <item>
      <title>Load Script Section Name?</title>
      <link>https://community.qlik.com/t5/App-Development/Load-Script-Section-Name/m-p/2543457#M109533</link>
      <description>&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Is there any method like a system variable or a function one could use in a load script to capture the name of the section of the load script? In the example shown, I am referring to the names of the sections: Main, Dictionary, and Calendar. I want to use this in the load script in a Trace statement so it will show in my load script log. But any other recommendation would we welcome. I'm hopeful it doesn't have to be manually typed or copied.&amp;nbsp;&lt;/P&gt;&lt;P&gt;From this link to the help information on using Sections to organize a load script:&amp;nbsp;&lt;A title="Link to Qlik's Help site on this topic" href="https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/LoadData/organize-script-code.htm" target="_blank" rel="noopener"&gt;https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/LoadData/organize-script-code.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Is there a way to get the names of sections? i.e., Main, Dictionary, and Calendar here." style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/187019i3B499CE568AC5BF3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ui_organize_script_code_cloud-rev" alt="Is there a way to get the names of sections? i.e., Main, Dictionary, and Calendar here." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Is there a way to get the names of sections? i.e., Main, Dictionary, and Calendar here.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks all!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Feb 2026 18:42:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-Script-Section-Name/m-p/2543457#M109533</guid>
      <dc:creator>dreavis</dc:creator>
      <dc:date>2026-02-20T18:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Load Script Section Name?</title>
      <link>https://community.qlik.com/t5/App-Development/Load-Script-Section-Name/m-p/2543463#M109535</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;This is not exactly what you asked for but it accomplishes a similar and more controlled approach to section execution. We encapsulate the code for each script section into its own subroutine. Then, we run them using a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;FOR EACH&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;loop. This automatically gives us a variable (&lt;/SPAN&gt;&lt;SPAN class=""&gt;vCurrentStep&lt;/SPAN&gt;&lt;SPAN class=""&gt;) that tracks exactly which section is running.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;// 1. Encapsulate each section in a subroutine
SUB Main
    // &amp;lt;Code for Main goes here&amp;gt;
END SUB;

SUB Dictionary
    // &amp;lt;Code for Dictionary goes here&amp;gt;
END SUB;

// 2. Loop through and execute them dynamically
FOR EACH vCurrentStep IN 'Main', 'Dictionary', 'Calendar'
    
    // Log the name of the current subroutine to the progress window
    TRACE &amp;gt;&amp;gt;&amp;gt; ========================================;
    TRACE &amp;gt;&amp;gt;&amp;gt; Now Running Step: $(vCurrentStep);
    TRACE &amp;gt;&amp;gt;&amp;gt; ========================================;
    
    // Execute the subroutine
    CALL $(vCurrentStep);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Feb 2026 23:11:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-Script-Section-Name/m-p/2543463#M109535</guid>
      <dc:creator>JonCarpenter</dc:creator>
      <dc:date>2026-02-20T23:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Load Script Section Name?</title>
      <link>https://community.qlik.com/t5/App-Development/Load-Script-Section-Name/m-p/2543776#M109598</link>
      <description>&lt;P&gt;I don't know of any way to get the name of the current section in load script. You could set a variable manually at the top of each section.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Set vSectionName = Dictionary;&lt;/P&gt;&lt;P&gt;Trace 'Starting Section: $(vSectionName)';&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2026 20:26:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-Script-Section-Name/m-p/2543776#M109598</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2026-02-25T20:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Load Script Section Name?</title>
      <link>https://community.qlik.com/t5/App-Development/Load-Script-Section-Name/m-p/2543780#M109599</link>
      <description>&lt;P&gt;Thank you, another very good choice!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2026 21:30:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-Script-Section-Name/m-p/2543780#M109599</guid>
      <dc:creator>dreavis</dc:creator>
      <dc:date>2026-02-25T21:30:44Z</dc:date>
    </item>
  </channel>
</rss>

