Kexi/Handbook/Building Simple Databases/Designing Forms/Assigning data sources

Kexi | Handbook | Building Simple Databases | Designing Forms
Revision as of 11:35, 20 April 2012 by Claus chr (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Other languages:Danish 100% • ‎English 100%

Assigning data sources

The fields you inserted have no data source assigned yet, so these are not able to display information from the database. To assign data source, use the Icon-server-database.png (Data Source) tab of the Property Editor pane.

The very first step is to specify the form's data source, i.e. a place the displayed data will be fetched from. As mentioned above, you will use table Persons as a data source for your new form.

  1. Click on the form's surface, as you will alter its properties.
  2. Switch to the Icon-server-database.png (Data Source) tab and enter persons table name in the Form's data source drop down list. Alternatively, you can select this name from the drop down list.

You have assigned form's data source. Now you need to do specify widget's data source.

  1. Click the first text field widget at the top of the form.
  2. In the Icon-server-database.png (Data Source) tab of the property pane enter field name name in the Widget's data source drop down list. Alternatively, you can select this name from the drop down list.
  3. Click on next text field widget and enter surname as the data source.
  4. Enter data sources for street, house_number and city text fields in a similar way.

You can now save the form's design (this is not mandatory to test the form in action). To save, click the Save toolbar button. Upon saving you will be asked for entering the form's name. Enter Persons as caption and click the OK button. The form's name will be filled automatically.

This is the right moment for testing your form. Click the Data toolbar button. Unless you made a mistake while entering data sources, you should see the form's fields filled with data from the Persons table.

Note-box-icon.png
 
Note
* If you want to remove widget's data source assignment for a form widget, you can use the Icon-edit-clear-locationbar-rtl.png button in the Widget's data source box.
  • Use the Icon-go-jump.png (Go to selected form's data source) button to select appropriate table or query in the Project Navigator, so you can quickly open a table or query being the data source of the form.



This page was last modified on 20 April 2012, at 11:35. This page has been accessed 1,053 times. Content is available under Creative Commons License SA 3.0 and the GNU Free Documentation License 1.2.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal