Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to establish a custom sort (as per Division).
Data comes in disordered.
After that, I sort the Divisions as follows:
TextSort:
mapping
load * inline
[Text,SortOrder
'RIDI DE',1
'Berlux',2
'RIDI PL',3
'RIDI AT',4
'RIDI UK',5
'RIDI CH',6
'RIDI FR',7;
Dual(Division,Applymap('TextSort',Division);
But, it doesn't work.
If I use Custom-Sort / numerical, the sort-order isn't as above.
What am I doing wrong ?
Hi Reinhold, first load the mapping table (you left the close bracket, and doesn't needs to be between single quotes):
TextSort:
mapping
load * inline
[Text,SortOrder
RIDI DE,1
Berlux,2
RIDI PL,3
RIDI AT,4
RIDI UK,5
RIDI CH,6
RIDI FR,7
];
then load the divisions applying the map:
[03) Divisionen]:
LOAD Dual([Test],Applymap('TextSort',[Test]) as Division;
FROM [lib://produktiv/Division-Test.xlsx]
(ooxml, embedded labels, table is [03) Divisionen]);
Hi Reinhold, first load the mapping table (you left the close bracket, and doesn't needs to be between single quotes):
TextSort:
mapping
load * inline
[Text,SortOrder
RIDI DE,1
Berlux,2
RIDI PL,3
RIDI AT,4
RIDI UK,5
RIDI CH,6
RIDI FR,7
];
then load the divisions applying the map:
[03) Divisionen]:
LOAD Dual([Test],Applymap('TextSort',[Test]) as Division;
FROM [lib://produktiv/Division-Test.xlsx]
(ooxml, embedded labels, table is [03) Divisionen]);
Thanks a lot - working now
For other newbies: