Kexi/Handbook/Building Simple Databases/Designing Forms/Assigning data sources/da: Difference between revisions
(Importing a new version from external source) |
(Importing a new version from external source) |
||
Line 6: | Line 6: | ||
Det allerførste skridt er at angive formularens datakilde, dvs. hvor de viste data skal hentes fra. Som tidligere nævnt skal vi bruge tabellen '''''personer''''' som datakilde til den nye formular. | Det allerførste skridt er at angive formularens datakilde, dvs. hvor de viste data skal hentes fra. Som tidligere nævnt skal vi bruge tabellen '''''personer''''' som datakilde til den nye formular. | ||
# | # Klik i selve formularen, da det er dens egenskaber du vil ændre. | ||
# 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. | ||
Revision as of 08:15, 20 April 2012
Tildel datakilder
Felterne du har indsat har endnu ikke fået tildelt en datakilde, så de kan ikke vise nogen information fra databasen. Du bruger fanebladet (Datakilde) i feltetEgenskabseditor til at tildele datakilder.
Det allerførste skridt er at angive formularens datakilde, dvs. hvor de viste data skal hentes fra. Som tidligere nævnt skal vi bruge tabellen personer som datakilde til den nye formular.
- Klik i selve formularen, da det er dens egenskaber du vil ændre.
- 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
toolbar button. 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.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 the form's fields filled with data from the Persons table.Note
* If you want to remove widget's data source assignment for a form widget, you can use the little black icon with a white cross at the right in the
box.
- 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.