Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
MKAPOOR1596038160

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
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.