Thanks you got me on the right track.
string= "sort this sentence";
string_list = sort list(words(string));
sorting_string = "";
for(i=1, i<=nitems(string_list), i++,
if(i<nitems(string_list),
Sorting_string = concat(sorting_string, string_list[i], " ");
,
Sorting_string = concat(sorting_string, string_list[i]);
);
);
show(string, string_list, Sorting_string);
----------------
Log:
string = "sort this sentence";
string_list = {"sentence", "sort", "this"};
Sorting_string = "sentence sort this";