<?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 QVDMigrator.qvs script brings fields into reversed order in Archived Groups</title>
    <link>https://community.qlik.com/t5/Archived-Groups/QVDMigrator-qvs-script-brings-fields-into-reversed-order/m-p/1046441#M1888</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on the Extract layer, we enumerate all fields for better identification. A QVD looks like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" height="99" style="width: 654px; height: 99.4339px;" width="654" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" height="111" src="https://community.qlik.com/legacyfs/online/123108_pastedImage_0.png" style="width: 557px; height: 110.859px;" width="557" /&gt;&lt;/P&gt;&lt;P&gt;However, after use of the QVD Migration function, the fields are turned around with the key fields at the end:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/123109_pastedImage_2.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is caused by this line of code in 9.QVDMigration.qvs:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-3" height="297" src="https://community.qlik.com/legacyfs/online/123116_pastedImage_3.png" style="width: 613px; height: 297.236px;" width="613" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" height="328" style="width: 678px; height: 327.83px;" width="678" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fields are read in the right order, but vL.Store_Select_tmp_new is concatenated with new field strings added&lt;STRONG&gt; to the left&lt;/STRONG&gt; oft it which results in a reversed order when vL.Store_Select_tmp_new is used in the LOAD statement. New fields shoud be added &lt;STRONG&gt;to the right&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do we have a mistake in calling the routine? Or does it need to be rewritten? If yes, shall we try that ourselves? We are not eager to modify QDF-internal code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Jul 2025 17:59:49 GMT</pubDate>
    <dc:creator>GeorgeQV</dc:creator>
    <dc:date>2025-07-22T17:59:49Z</dc:date>
    <item>
      <title>QVDMigrator.qvs script brings fields into reversed order</title>
      <link>https://community.qlik.com/t5/Archived-Groups/QVDMigrator-qvs-script-brings-fields-into-reversed-order/m-p/1046441#M1888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on the Extract layer, we enumerate all fields for better identification. A QVD looks like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" height="99" style="width: 654px; height: 99.4339px;" width="654" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" height="111" src="https://community.qlik.com/legacyfs/online/123108_pastedImage_0.png" style="width: 557px; height: 110.859px;" width="557" /&gt;&lt;/P&gt;&lt;P&gt;However, after use of the QVD Migration function, the fields are turned around with the key fields at the end:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/123109_pastedImage_2.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is caused by this line of code in 9.QVDMigration.qvs:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-3" height="297" src="https://community.qlik.com/legacyfs/online/123116_pastedImage_3.png" style="width: 613px; height: 297.236px;" width="613" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" height="328" style="width: 678px; height: 327.83px;" width="678" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fields are read in the right order, but vL.Store_Select_tmp_new is concatenated with new field strings added&lt;STRONG&gt; to the left&lt;/STRONG&gt; oft it which results in a reversed order when vL.Store_Select_tmp_new is used in the LOAD statement. New fields shoud be added &lt;STRONG&gt;to the right&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do we have a mistake in calling the routine? Or does it need to be rewritten? If yes, shall we try that ourselves? We are not eager to modify QDF-internal code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2025 17:59:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/QVDMigrator-qvs-script-brings-fields-into-reversed-order/m-p/1046441#M1888</guid>
      <dc:creator>GeorgeQV</dc:creator>
      <dc:date>2025-07-22T17:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: QVDMigrator.qvs script brings fields into reversed order</title>
      <link>https://community.qlik.com/t5/Archived-Groups/QVDMigrator-qvs-script-brings-fields-into-reversed-order/m-p/1046442#M1889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Georg, great that you found this problem, If you like you can change yourself and apply the code change to this discussion after it will be validated and the framework updated. Else I can do the change but that will take some time as I'm at Qlik user conference Qonnections in Orlando the week to come.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Magnus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Apr 2016 01:23:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/QVDMigrator-qvs-script-brings-fields-into-reversed-order/m-p/1046442#M1889</guid>
      <dc:creator>Magnus_Berg</dc:creator>
      <dc:date>2016-04-30T01:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: QVDMigrator.qvs script brings fields into reversed order</title>
      <link>https://community.qlik.com/t5/Archived-Groups/QVDMigrator-qvs-script-brings-fields-into-reversed-order/m-p/1046443#M1890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Magnus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I rewrote the code and it works just fine for me. Please see the attached picture:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="123287" alt="" class="jive-image image-1" height="298" src="https://community.qlik.com/legacyfs/online/123287_pastedImage_0.png" style="width: 478px; height: 298.365px;" width="478" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Original version:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14621943252022662 jive_text_macro" jivemacro_uid="_14621943252022662"&gt;
&lt;P&gt;LET vL.Store_Select_tmp_new='['&amp;amp;'$(vL.TempField)'&amp;amp;'], '&amp;amp;'$(vL.Store_Select_tmp_new)'; // Concatenated statement&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modified version:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14621943392789136" jivemacro_uid="_14621943392789136" modifiedtitle="true"&gt;
&lt;P&gt;LET vL.Store_Select_tmp_new= '$(vL.Store_Select_tmp_new)' &amp;amp; '[' &amp;amp; '$(vL.TempField)' &amp;amp; ']' &amp;amp; ',';&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice that I only modified the code for CASE DEFAULT in the control structure because at the moment I do not need the others. It would be great if you could apply this quick fix to the others and in future releases of QDF as well &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;All the best&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2016 12:59:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/QVDMigrator-qvs-script-brings-fields-into-reversed-order/m-p/1046443#M1890</guid>
      <dc:creator>GeorgeQV</dc:creator>
      <dc:date>2016-05-02T12:59:06Z</dc:date>
    </item>
  </channel>
</rss>

