SEARCH:

table.projection



A projection is nothing but a named list of columns, which you can make use of in your application. Projections have no impact on business rules, they are purely for the use of the user interface.

If you create a projection named "dropdown", then the framework will display that list of columns whenever this table is used as a lookup list with an HTML SELECT or our Ajax Dynamic List.

The framework will also support in the future the use of a projection named "new", which specifies which columns a user should see when they are entering a new row. Right now this feature does not exist yet, so a user always sees the same detail in insert mode, lookup mode, and update mode.

A projection is an ordered. When you access the columns they will always be in the order they were defined.

Example
table employees:An employees table with some projections
   column employee_id:
      primary_key: "Y"
      uisearch: "Y"
   column first_name:
      uisearch: "Y"
   column last_name:
      uisearch: "Y"
   
   # Here is an example of using the dropdown projection
   projection dropdown:
      column employee_id:
      column first_name:
      column last_name:
Pull the projection at run-time
<?php
class employees extends x_table2 {
   function 
main() {
      
$dd=dd_tableref('employees');
      
$dropdown=$dd['projections']['dropdown'];
      echo 
$dropdown;
   }
}
?>
will give a comma-separated list
employee_id,first_name,last_name