ad_table_column_list

one of the documented procedures in this installation of the ACS
Usage:
ad_table_column_list { -sortable all } datadef columns
What it does:
build a list of pointers into the list of column definitions

returns a list of indexes into the columns one per column it found

-sortable from t/f/all

Defined in: /web/philip/packages/acs-core/table-display-procs.tcl

Source code:

arg_parser_for_ad_table_column_list $args

    set column_list {}
    if {[empty_string_p $columns]} {
        for {set i 0} {$i < [llength $datadef]} {incr i} {
            if {$sortable == "all" 
                || ($sortable == "t" && [lindex [lindex $datadef $i] 2] != "no_sort")
                || ($sortable == "f" && [lindex [lindex $datadef $i] 2] == "no_sort")
            } {
                lappend column_list $i
            } 
        }
    } else { 
        set colnames {}
        foreach col $datadef { 
            if {$sortable == "all" 
                || ($sortable == "t" && [lindex $col 2] != "no_sort")
                || ($sortable == "f" && [lindex $col 2] == "no_sort")
            } {
                lappend colnames [lindex $col 0]
            } else {
                # placeholder for invalid column
                lappend colnames "X+X"
            }
        }
        foreach col $columns {
            set i [lsearch $colnames $col]
            if {$i > -1} {
                lappend column_list $i
            }
        }
    }
    
    return $column_list


philg@mit.edu