Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
GeorgeQV
Contributor III
Contributor III

QVDMigrator.qvs script brings fields into reversed order

Dear all,

on the Extract layer, we enumerate all fields for better identification. A QVD looks like this:

However, after use of the QVD Migration function, the fields are turned around with the key fields at the end:

The issue is caused by this line of code in 9.QVDMigration.qvs:

The fields are read in the right order, but vL.Store_Select_tmp_new is concatenated with new field strings added to the left 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 to the right.

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.

Thank you in advance.

2 Replies
Magnus_Berg
Employee
Employee

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.

Best regards

Magnus

GeorgeQV
Contributor III
Contributor III
Author

Hi Magnus,

I rewrote the code and it works just fine for me. Please see the attached picture:

Original version:

LET vL.Store_Select_tmp_new='['&'$(vL.TempField)'&'], '&'$(vL.Store_Select_tmp_new)'; // Concatenated statement

Modified version:

LET vL.Store_Select_tmp_new= '$(vL.Store_Select_tmp_new)' & '[' & '$(vL.TempField)' & ']' & ',';

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

All the best