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

Ortwin Zillgen (4/23/14 4:09PM)
Florian P?ck (4/24/14 12:55PM)

Ortwin Zillgen (4/23/14 4:09 PM)

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


check System_Tables <>

O r t w i n ?Z i l l g e n
<mailto:info@... =A0=A0<>
<feed://> <>
member of developer-network <>

Florian P?ck (4/24/14 12:55 PM)

Thanks Arnaud,

this was really helpful.

Le 23 avr. 2014 &Ocirc;&oslash;? 14:23, Florian P&Ocirc;&oslash;?ck a &Ocirc;&oslash;?crit :

The 'SET TABLE TITLES' command allows to get table names sorted, for
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 if
End for
SORT ARRAY($table_at;$table_al;>) ?//tri alpha
SET TABLE TITLES($table_at;$table_al)
&Ocirc;&oslash;? but it is made for user interface purpose:
1/ use more "user friendly" names for tables/fields
2/ have tables sorted in editors such as QUERY, SORT, etc.
3/ hide some tables
All this to say it won't suit your need.

If you need to get the table from its name:
//DB_tablePtrByName (tableName_t) -> ptr
//returns a pointer on the table tableName_t if found
Case of
: (Not(Asserted(Count parameters>0;Current method name+" $1
For ($table_l;1;Get last table number)
If (Is table number valid($table_l))
If (Table name($table_l)=$name_t)
$table_l:=MAXINT ?//end for
End if
End if
End for
End case

Arnaud de Montard

Reply to this message

Summary created 4/24/14 at 8:11AM by Intellex Corporation

Comments welcome at: