This tag is primarily designed to create quick'n'dirty results tables from within an inline, though it will work with any properly formatted data set you provide. It supports sortable columns, hidden fields, and alternating row and header styles. You can also replace the contents of any column with the result of a compound expression or tag reference. Requires [client_params]. Can be used in concert with [results_navigation] and [results_status] to put together a basic results page fairly quickly.
Parameters
-headers
array, optional
An array of field names to be used as table headers. Defaults to [field_names].
-data
array, optional
An array of arrays containing row data. Defaults to [rows_array].
-hidden
array, optional
An array of fields to exclude from display. The values of hidden fields are still available in each row for processes.
-procs
map, optional
A map of field names to compound expressions or tag references. All the field values for the current row are available to the procs as params.
-sortable
boolean, optional
Determines whether to make column headers sortable. Defaults to true.
Click the "Download" button below to retrieve a copy of this tag,
including the complete documentation and sample usage shown
on this page. Place the downloaded ".inc" file in your
LassoStartup folder, restart Lasso, and you can begin using this
tag immediately.
05/12/2008, Asle Benoni Re: Use other headers then field names?
I also use this with -sql inlines. Just a small example code snippet for where you put the alias would get me in the right direction :-)
05/08/2008, Jason Huck Re: Use other headers then field names?
I'm sure this could be improved if I had the time, but I always use this with -sql inlines and simply define aliases for the column names right in the query. Works great, even with sorting.
05/08/2008, Asle Benoni Use other headers then field names?
Hi, very nice tag that I use often to make quick results tables. Is there any way to show other headers then the field names? I.ex. the field is called "c_name" and "d_name" but I would like the header to show "Customer" and "Dealer". Some kind of map to check against? This would be a great feature :-)
11/20/2007, Jason Huck Update
Now handles single params correctly (i.e., -random vs. -random=true).
01/21/2007, Asle Benoni Problems sorting if ('headers') are different from field names
If 'headers' are manually defined the sorting will not work. I.ex. the fieldname is "cust_name" and one wants to display "Customer". Sorting would try to sort by "Customer" which does not exist as a field in the table. I tried to define another array with field_names but did not really get it to work. Something different must run in the "iterate(#headers, local('i'));" part I think. Glad for a simple solution!
03/17/2006, Jason Huck Bug Fix
Fixed an issue where the tag would error if -procs were not defined.
Re: Use other headers then field names?
I also use this with -sql inlines. Just a small example code snippet for where you put the alias would get me in the right direction :-)