public function check_the_sorting_of_table(in objTableDescr, in bAscDesc, in nCol, in nFirstLineToCompare)
The first parameter is the table in which the gui-object or physical description is entered. The second parameter determines whether to check descending or ascending. The third parameter determines which column is checked for sorting and the fourth determines the line at which to start the comparing.
Take into account that you cannot compare unless you have at least two results (because else the sorting is always OK!!).
So check if the nFirstLineToCompare + 1 is not beyond the number of rows of the table.
Loop with retrieval of next cell and compare value with last value.
Maybe it's a good idea to create a second function that retrieves the data out of a table's cell. Something like:
If this function returns a value of e.g.
"ENDOFTABLE", you can
A. handle all errors in this function
B. use this returnvalue of the function to check whether the last line has been reached, when retrieving data in the loop of the first function.
Hope this is helpfull.
If you've have some experience in scripting/TSL it shouldn't be a problem.