<?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: Getfieldselections() sort order inconsistency in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Getfieldselections-sort-order-inconsistency/m-p/2092203#M89523</link>
    <description>&lt;P&gt;AFAIK you couldn't influence the sort-ordering of values within the getfieldselections() unless you used numerical values. Means instead of Dec 22 you applies 202212 respectively dual('Dec 22',&amp;nbsp;202212).&lt;/P&gt;
&lt;P&gt;Beside this you may consider a simplifying of the logic like:&lt;/P&gt;
&lt;P&gt;count(&lt;BR /&gt;&amp;nbsp; {&amp;lt;&amp;nbsp;StringMonth1 = {"$=(subfield(concat(distinct StringMonth1, ',', NumericalMonth1), ',', 1))"}&amp;gt;} &lt;BR /&gt;Event)&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jul 2023 16:54:03 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2023-07-10T16:54:03Z</dc:date>
    <item>
      <title>Getfieldselections() sort order inconsistency</title>
      <link>https://community.qlik.com/t5/App-Development/Getfieldselections-sort-order-inconsistency/m-p/2092191#M89521</link>
      <description>&lt;P style="margin-bottom: 8.25pt;"&gt;&lt;SPAN&gt;I have a question regarding of Getfieldselections() orders. I used the script below at loadeditor to choose ‘savedMonth1’ in order.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;set vSelectedMonth1 = Subfield(Getfieldselections(savedMonth1),',',1);

set vSelectedMonth2 = Trim(Subfield(Getfieldselections(savedMonth1),',',2));

set vSelectedMonth3 = Trim(Subfield(Getfieldselections(savedMonth1),',',3));

set vSelectedMonth4 = Trim(Subfield(Getfieldselections(savedMonth1),',',4));

set vSelectedMonth5 = Trim(Subfield(Getfieldselections(savedMonth1),',',5));&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;Which works perfectly fine for the first five months of data set (Sep 22&amp;gt;Oct22 &amp;gt; Nov22 &amp;gt; Dec22&amp;gt; Jan23 )&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nezuko_kamado_0-1689003662402.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/111923i75DD7933FB9B9EE0/image-size/large?v=v2&amp;amp;px=999" role="button" title="nezuko_kamado_0-1689003662402.png" alt="nezuko_kamado_0-1689003662402.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I select the recent five months of&amp;nbsp; Dec 22&amp;gt; Jan 23&amp;gt; Feb23 &amp;gt; Mar23 &amp;gt; Apr23 , the order of months gets messed up.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It shows as &lt;FONT color="#FF0000"&gt;Feb 23&amp;gt; Jan23 &amp;gt; Dec22&lt;/FONT&gt; &amp;gt; Mar 23&amp;gt; Apr23.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nezuko_kamado_1-1689003996727.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/111924iD66144C20B68FF80/image-size/large?v=v2&amp;amp;px=999" role="button" title="nezuko_kamado_1-1689003996727.png" alt="nezuko_kamado_1-1689003996727.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When I try Nov22&amp;gt;&lt;SPAN&gt;Dec 22&amp;gt; Jan 23&amp;gt; Feb23 &amp;gt; Mar23 , it displays &lt;FONT color="#FF0000"&gt;Dec22&amp;gt;Nov22&lt;/FONT&gt;&amp;gt;Jan23&amp;gt;Feb23&amp;gt;Mar23 as well.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Do you know why is this happening?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 15:52:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Getfieldselections-sort-order-inconsistency/m-p/2092191#M89521</guid>
      <dc:creator>nezuko_kamado</dc:creator>
      <dc:date>2023-07-10T15:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Getfieldselections() sort order inconsistency</title>
      <link>https://community.qlik.com/t5/App-Development/Getfieldselections-sort-order-inconsistency/m-p/2092203#M89523</link>
      <description>&lt;P&gt;AFAIK you couldn't influence the sort-ordering of values within the getfieldselections() unless you used numerical values. Means instead of Dec 22 you applies 202212 respectively dual('Dec 22',&amp;nbsp;202212).&lt;/P&gt;
&lt;P&gt;Beside this you may consider a simplifying of the logic like:&lt;/P&gt;
&lt;P&gt;count(&lt;BR /&gt;&amp;nbsp; {&amp;lt;&amp;nbsp;StringMonth1 = {"$=(subfield(concat(distinct StringMonth1, ',', NumericalMonth1), ',', 1))"}&amp;gt;} &lt;BR /&gt;Event)&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 16:54:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Getfieldselections-sort-order-inconsistency/m-p/2092203#M89523</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-07-10T16:54:03Z</dc:date>
    </item>
  </channel>
</rss>

