-
Dynamic sorting of lists
Dear $all,
I am writing a method to sort lists, where I pass the the fields to be sorted as row(‘fieldname1′,’fieldname2′,…,’fieldnameN’). How do I build the $sort parameters in order to make it work? This, and MANY other attempts did not work (however, it does some sorting, but I have not understanding the logic of it…):
Calculate llList as $cinst
For liCurrentCol from 1 to prSortByFields.$colcount
Calculate lcSortField as prSortByFields.[liCurrentCol]
Calculate lcSortOrder as con(lcSortOrder,llList.$sqlclassname,'.',lcSortField,',kFalse,')
End For
Calculate lcSortOrder as left(lcSortOrder,len(lcSortOrder)-1)
Do llList.$sort(lcSortOrder)
Thanks in advance
Uwe
Log in to reply.