Kexi/Handbook/Building Simple Databases/Designing Forms/Assigning data sources: Difference between revisions
m (add translation tags) |
(Marked this version for translation) |
||
Line 1: | Line 1: | ||
<languages/> | <languages/> | ||
<translate> | <translate> | ||
====Assigning data sources==== | ====Assigning data sources==== <!--T:1--> | ||
<!--T:2--> | |||
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 <menuchoice>Data Source</menuchoice> tab of the '''Property''' pane. | 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 <menuchoice>Data Source</menuchoice> tab of the '''Property''' pane. | ||
<!--T:3--> | |||
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. | 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. | ||
<!--T:4--> | |||
# Click on the form's surface, as you will alter its properties. | # Click on the form's surface, as you will alter its properties. | ||
# Switch to the <menuchoice>Data Source</menuchoice> 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. | # Switch to the <menuchoice>Data Source</menuchoice> 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. | ||
<!--T:5--> | |||
You have assigned form's data source. Now you need to do specify widget's data source. | You have assigned form's data source. Now you need to do specify widget's data source. | ||
<!--T:6--> | |||
# Click the first text field widget at the top of the form. | # Click the first text field widget at the top of the form. | ||
# In the <menuchoice>Data Source</menuchoice> 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. | # In the <menuchoice>Data Source</menuchoice> 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. | ||
Line 17: | Line 22: | ||
# Enter data sources for street, house_number and city text fields in a similar way. | # Enter data sources for street, house_number and city text fields in a similar way. | ||
<!--T:7--> | |||
You can now save the form's design (this is not mandatory to test the form in action). To save, click the <menuchoice>Save object changes</menuchoice> toolbar button or use the <menuchoice>File-> Save</menuchoice> (<keycap>Ctrl+S</keycap>) menu command. Upon saving you will be asked for entering the form's name. Enter '''''Persons''''' as caption and click the <menuchoice>OK</menuchoice> button. The form's name will be filled automatically. | You can now save the form's design (this is not mandatory to test the form in action). To save, click the <menuchoice>Save object changes</menuchoice> toolbar button or use the <menuchoice>File-> Save</menuchoice> (<keycap>Ctrl+S</keycap>) menu command. Upon saving you will be asked for entering the form's name. Enter '''''Persons''''' as caption and click the <menuchoice>OK</menuchoice> button. The form's name will be filled automatically. | ||
<!--T:8--> | |||
This is the right moment for testing your form. Click the <menuchoice>Switch to data view</menuchoice> toolbar button. Unless you made a mistake while entering data sources, you should see form's fields filled with data from the persons table. | This is the right moment for testing your form. Click the <menuchoice>Switch to data view</menuchoice> toolbar button. Unless you made a mistake while entering data sources, you should see form's fields filled with data from the persons table. | ||
Line 25: | Line 32: | ||
* Use the <menuchoice>Go to selected form's data source</menuchoice> 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.}} | * Use the <menuchoice>Go to selected form's data source</menuchoice> 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.}} | ||
<!--T:9--> | |||
{{Prevnext2 | {{Prevnext2 | ||
|prevpage=Special:MyLanguage/Kexi/Handbook/Building_Simple_Databases/Designing_Forms/Inserting_widgets_-_text_fields | |prevpage=Special:MyLanguage/Kexi/Handbook/Building_Simple_Databases/Designing_Forms/Inserting_widgets_-_text_fields | ||
Line 33: | Line 41: | ||
}} | }} | ||
<!--T:10--> | |||
[[Category:Kexi]] | [[Category:Kexi]] | ||
[[Category:Tutorials]] | [[Category:Tutorials]] | ||
</translate> | </translate> |
Revision as of 19:21, 14 December 2011
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
tab of the Property 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.
- Click on the form's surface, as you will alter its properties.
- Switch to the 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.
- Click the first text field widget at the top of the form.
- In the 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.
- Click on next text field widget and enter surname as the data source.
- 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 Ctrl+S) menu command. Upon saving you will be asked for entering the form's name. Enter Persons as caption and click the button. The form's name will be filled automatically.
toolbar button or use the (This is the right moment for testing your form. Click the
toolbar button. Unless you made a mistake while entering data sources, you should see form's fields filled with data from the persons table.- Use the 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.