= Generic Database Messages: Using modelglue.!GenericList = When this message is broadcast, the !DataController will attempt to list records from a given table. This message is configured by using the following tags: 1. Object (Required) - The name of the table to list. 1. !QueryName (Optional) - The name of the viewstate value to set the resultant query into. Defaults to Object & "Query". 1. Criteria (Optional) - A list of viewstate values to use as filters. Any value listed whose name matches a column in the target table will be used as a filter in the query's WHERE clause. 1. !OrderBy (Optional) - A single column name by which to order the query. 1. Ascending (Optional) - If set to true, order will be ascending. If set to false, order will be descending. == Examples == === A Basic Generic List === To perform a basic list on a Contact table, the following tag could be added to an : {{{ }}} A View could then the query by performing the following code: {{{ }}} === Customizing the Viewstate value name === To perform a basic list on a Contact table and set it into a specific value in the Viewstate, the following tag could be added to an : {{{ }}} A View could then the query by performing the following code: {{{ }}} === Applying a Filter === To perform a basic list on a Contact table that would filter on the viewstate's current Firstname value, the following tag could be added to an : {{{ }}} Assuming an event-handler name of "contact.list", visiting the event handler with the following URL would result in only contacts with a Firstname of "Fred" being selected: index.cfm?event=contact.list&firstname=Fred === Ordering === To perform a basic list on a Contact table ordered by Lastname (ascending), the following tag could be added to an : {{{ }}} To reverse the order, the following argument tag could be added: {{{ }}} A View could then the query by performing the following code: {{{ }}}