Cancel
Showing results for 
Search instead for 
Did you mean: 

Name of column of highest value

Creator
Creator

Hi all,

 

I'm stuck with a simple problem.

I have values in a table and need to find the coulmn with the highest value in row 1.

With the max() function I can find the highest value. But what command can I use to show the name (or number) of the column, where the highest number was found.

 

Thank you very much for your help,

Regards,

Ben

 

2 REPLIES

Re: Name of column of highest value

Valued Contributor
Valued Contributor

Hello Ben,

 

use cursorX and cursorY:

 

is
    row : integer;
    column : integer;
do
    tab.setcursor(1,1);
    tab.max({1,1}..{*,*});
    row := tab.cursorY;
    column := tab.cursorX;
end;

Re: Name of column of highest value

Creator
Creator

Thank you