HtmlTable

Takes 6 parameters, Location, Mode, Class, bNoHeader, bNoAutoAlign, bNoIDTags

Usage:

Location, Mode, Class, bNoHeader, bNoAutoAlign, bNoIDTags
Location, Mode, Class, bNoHeader, bNoAutoAlign, [""]
Location, Mode, Class, bNoHeader, [""], [""]
Location, Mode, Class, [""], [""], [""]
Location, Mode, ["table table-hover"], [""], [""], [""]
Location, ["Append"], ["table table-hover"], [""], [""], [""]
["Runtime"], ["Append"], ["table table-hover"], [""], [""], [""]

Description:

Creates an HTML Table from the Work Query. If the Header is displayed, the system will attempt to look up the Label names out of the database instead of displaying the Field names. If the field names are not found in the database, any dots (.) will be removed from the name in the header.

Class Parameter

The Class Parameter may specify an ID by having one of the space-separated values start with a #. That name will then be set as the ID for the table.

Assigning classes to the theader and tbody instead of or in addition to the table element is possible by using named values within the Class parameter as follows: "table='table classes' theader='theader classes' tbody='tbody classes'"

By default, the Class parameter adds the bootstrap "table" and "table-hover" classes if the template is a bootstrap template.

Table Row Classes and Attributes

If the field named #TRClass exists in the Work Query, that value from each records will be used as the class for that record's tr element

If the field named #TRAttr exists in the Work Query, that value which may contain one or more attributes, from each records will be added to that records' tr element

 

Rem 'Get our data
    LoadTable       "MemTab.Person"
EndRem

Rem 'Default Table
    HtmlTable
EndRem

Rem 'Table with custom classes for thead and tbody
    HtmlTable       "", "", "table='table table-hover customTable' thead='customTH' tbody='customTB'"
EndRem

Rem 'Table with custom class and custom attributes per row
    NewFields       "#TRClass #TRAttr"
    Set             "#TRClass", "`customTR"
    Build       "", "#TRAttr", "`onclick=clickMe(", "MemTab.Person.Alias", ")", ""
    HtmlTable
EndRem