Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
MKAPOOR1596038160
Contributor II
Contributor II

Unable to sort data in a string

Hello,

I have my input data in following format

dlh2021: xxxx

shz8080: yyyy

dlh2022 : zzzzz

The position of dlh* or shz* may vary in the input data. So i want to sort them before loading to database.

During transformation using tMap, using regex & stringHandling, i am able to get these values in a tMap string variable like this

"dlh2021 shz8080 dlh2022" i.e in same sequence as they appear in the input. Now i find no way to sort them so as to achieve dlh2021 dlh2022 shz8080? The sorting should be alphanumeric.

I checked tSortRow but that component can sort data between multiple rows. However i want to sort data within a single row.

Please suggest how can i achieve my objective?

Labels (3)
2 Replies
manodwhb
Champion II
Champion II

@MADHUSUDAN KAPOOR​ , you can sort the records not the values in a single column or multiple columns. if you want to sort the above data first you need to get into rows and sort the data.

MKAPOOR1596038160
Contributor II
Contributor II
Author

Finally i need the 3 records in a row. So its not worth to again arrange them by row.

However i got it resolved with help of tJavaRow.

 

Thanks for your help.