Fill a popup-drop-down with a sorted list of all tables

color><param>00000,0000,DDEE/param>IIs there a way to define some kindof sorting in combination of 'Get last table number' or should i firstfill an array with all table-names, sort that array, and then use thatarray to fill the popup-dropdown?/color>that'll work. As of V14, check ARRAY TO LIST

The 'SET TABLE TITLES' command allows to get table names sorted, forexample:[code]C_LONGINT($table_l)ARRAY LONGINT($table_al;0)ARRAY TEXT($table_at;0)//_For ($table_l;1;Get last table number) ?//;-1)If (Is table number valid($table_l))APPEND TO ARRAY($table_al;$table_l)APPEND TO ARRAY($table_at;Table name($table_l))End ifEnd forSORT ARRAY($table_at;$table_al;>) ?//tri alphaSET TABLE TITLES($table_at;$table_al)[/code]&Ocirc;&oslash;? but it is made for user interface purpose:1/ use more "user friendly" names for tables/fields2/ have tables sorted in editors such as QUERY, SORT, etc.3/ hide some tablesAll this to say it won't suit your need.

If you need to get the table from its name:[code]//DB_tablePtrByName (tableName_t) -> ptr//returns a pointer on the table tableName_t if foundC_POINTER($0)C_TEXT($1)C_LONGINT($table_l)C_POINTER($out_p)C_TEXT($name_t)Case of: (Not(Asserted(Count parameters>0;Current method name+" $1missing")))Else$name_t:=$1For ($table_l;1;Get last table number)If (Is table number valid($table_l))If (Table name($table_l)=$name_t)$out_p:=Table($table_l)$table_l:=MAXINT ?//end forEnd ifEnd ifEnd forEnd case$0:=$out_p[/code]