<?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 Listbox SortByState via API in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Listbox-SortByState-via-API/m-p/213638#M67309</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 am trying to create list boxes dynamically as part of the 'OnPostReload'.&lt;/P&gt;&lt;P&gt;With v9 (I am using SR3) there is now the option to sort by state 'Auto Ascending' as well as ascending and descending. Defaulting to 'Auto Ascending' is a pain and I hate it!&lt;/P&gt;&lt;P&gt;By macro, whatever value I set SortByState to (only value allowed are -1, 0, 1) I can never set SortByState off and I actually want to set the state to Ascending. Is there a bug? See my code below and notice that SortByText is commented out as this doesnt seem available.&lt;/P&gt;&lt;P&gt;sub setlb18&lt;BR /&gt; set LB = ActiveDocument.GetSheetObject("LB18")&lt;BR /&gt; set BoxProp = LB.GetProperties&lt;BR /&gt; BoxProp.SortCriteria.SortByState = -1&lt;BR /&gt; BoxProp.SortCriteria.SortByExpression = 0&lt;BR /&gt; BoxProp.SortCriteria.SortByFrequency = 0&lt;BR /&gt; BoxProp.SortCriteria.SortByNumeric = 0&lt;BR /&gt;' BoxProp.SortCriteria.SortByText = 0&lt;BR /&gt; BoxProp.SortCriteria.SortByLoadOrder = 0&lt;BR /&gt; LB.SetProperties BoxProp&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;Also, I really want to set each of them the same but I only seem to be able to do so by setting them individually - is there a way of setting them 'same as'?&lt;/P&gt;&lt;P&gt;Any help appreciated.&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Apr 2010 12:55:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-04-14T12:55:40Z</dc:date>
    <item>
      <title>Listbox SortByState via API</title>
      <link>https://community.qlik.com/t5/QlikView/Listbox-SortByState-via-API/m-p/213638#M67309</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 am trying to create list boxes dynamically as part of the 'OnPostReload'.&lt;/P&gt;&lt;P&gt;With v9 (I am using SR3) there is now the option to sort by state 'Auto Ascending' as well as ascending and descending. Defaulting to 'Auto Ascending' is a pain and I hate it!&lt;/P&gt;&lt;P&gt;By macro, whatever value I set SortByState to (only value allowed are -1, 0, 1) I can never set SortByState off and I actually want to set the state to Ascending. Is there a bug? See my code below and notice that SortByText is commented out as this doesnt seem available.&lt;/P&gt;&lt;P&gt;sub setlb18&lt;BR /&gt; set LB = ActiveDocument.GetSheetObject("LB18")&lt;BR /&gt; set BoxProp = LB.GetProperties&lt;BR /&gt; BoxProp.SortCriteria.SortByState = -1&lt;BR /&gt; BoxProp.SortCriteria.SortByExpression = 0&lt;BR /&gt; BoxProp.SortCriteria.SortByFrequency = 0&lt;BR /&gt; BoxProp.SortCriteria.SortByNumeric = 0&lt;BR /&gt;' BoxProp.SortCriteria.SortByText = 0&lt;BR /&gt; BoxProp.SortCriteria.SortByLoadOrder = 0&lt;BR /&gt; LB.SetProperties BoxProp&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;Also, I really want to set each of them the same but I only seem to be able to do so by setting them individually - is there a way of setting them 'same as'?&lt;/P&gt;&lt;P&gt;Any help appreciated.&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 12:55:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Listbox-SortByState-via-API/m-p/213638#M67309</guid>
      <dc:creator />
      <dc:date>2010-04-14T12:55:40Z</dc:date>
    </item>
    <item>
      <title>Listbox SortByState via API</title>
      <link>https://community.qlik.com/t5/QlikView/Listbox-SortByState-via-API/m-p/213639#M67310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aha!&lt;/P&gt;&lt;P&gt;I found 'SuppressAutoSortByState' which seems to do the job!&lt;/P&gt;&lt;P&gt;sub setlb18&lt;BR /&gt; set LB = ActiveDocument.GetSheetObject("LB18")&lt;BR /&gt; set BoxProp = LB.GetProperties&lt;BR /&gt; BoxProp.SuppressAutoSortByState=true&lt;BR /&gt; BoxProp.SortCriteria.SortByState = 1&lt;BR /&gt; BoxProp.SortCriteria.SortByExpression = 0&lt;BR /&gt; BoxProp.SortCriteria.SortByFrequency = 0&lt;BR /&gt; BoxProp.SortCriteria.SortByNumeric = 0&lt;BR /&gt;' BoxProp.SortCriteria.SortByText = 0&lt;BR /&gt; BoxProp.SortCriteria.SortByLoadOrder = 0&lt;BR /&gt; LB.SetProperties BoxProp&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;I would still love to set up a template for list box settings though.....&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 14:06:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Listbox-SortByState-via-API/m-p/213639#M67310</guid>
      <dc:creator />
      <dc:date>2010-04-14T14:06:17Z</dc:date>
    </item>
  </channel>
</rss>

