Forum OpenACS Development: Re: List builder with .csv download and empty fields

Collapse
Posted by Dave Bauer on
You could have added the column as empty by adding it like this
db_multirow -extend {birthdt} my_data ...

The key is that it needed to exist as a column in the multirow.

To change the headers you'd need to modify template::list::write_csv

Something like this

foreach __element_name $list_properties(display_elements) {
template::list::element::get_reference -list_name $name -element_name $__element_name
if {!$element_properties(hide_p)} {
lappend __csv_cols [csv_quote $__element_name]
lappend __csv_labels $element_properties(label)
}
}
append __output "\"[join $__csv_labels "\",\""]\"\n"