Purpose


Setting of the component is necessary when you want to display all records from the database table or child records on the record creation/editing form (for example, all phone numbers of the person).



Description



1. Select the database table from which we will take the information. In this example, we display a list of people, so choose a database table named person



2. Choose which fields of the database table you want to show. Note that we can add fields from other database tables, such as groups.groupname, because the table person has a foreign key to the table groups (in this example it is person.ig_groups).

We also assign names to the headers (First name, Last name, Group)

The third column with the icon  allows you to set the formula for calculating the total value in the footer and select the alignment of the text for that column. More info.

If necessary, you can choose which database field to sort by.

When selecting a database field to sort from a list, the final sorting is performed directly by the component itself, which increases the performance of retrieving data from the database. When specifying sorting manually (ORDER BY), sorting is performed on the DBMS side.


3. You can filter records by conditions. The syntax of the conditions is similar to the syntax of the SQL query language in the WHERE section. It is acceptable to use calculated fields in this field, which must be of the form: {tablename.calculated_field_name}


Note the line on the left side: #Auto-Number, you can use it to add a column with continuous numbering.

With the #Checkbox line, you can add a checkbox column, for example, to mark records you want. This column is usually used in conjunction with the script.


Note the options: "Show child records" and "Show all records from table".

If you need to display all records from the database table, select "Show all records from table".

If the component is on a form designed to create/edit a record and you need to show the child records, select "Show child records". An example of a child record can be all phone numbers that belong to the person.