DDH Software, LLC Making a big world smaller






Return to Knowledgebase Home
Tutorial 10: Jumping from the Form of one database to the form of a different database (Palm OS)
Product: Article Number: 302Creation Date: 12/07/2007

- Topic: Creation of a Sub-Form in Another Database

- Product: HanDBase Forms

- Version: 4.0

- Date Modified: February 4, 2010

- Handheld OS: Palm OS

- Desktop OS: Windows

__________________________________________________________

Tutorial:

This tutorial's goal is to introduce the ability to jump from one database's form to a form in another database as a new feature in HanDBase Forms version 4.0. This feature's main function is to allow for more complex database designs by allowing databases to be interrelated via forms in the edit view. This tutorial uses related database which utilize the Link and Linked field relationship. In this tutorial, the necessary steps to configure HanDBase Forms on the handheld device to take advantage of this new feature will be detailed. Then, the results of properly configuring a set of database's forms will be examined. Finally, additional resources will be provided should any further information be needed.


To take advantage of the ability to jump to and from forms, HanDBase and HanDBase Forms version 4 first needs to be configured on the handheld device. The first step in doing so is to launch HanDBase in the manner most appropriate for the particular model of handheld being used. Once running, the steps in configuring are:

Step #1:

Once HanDBase is opened, the first step is to create a database on the handheld device or select an existing database with similar field types.

Database Name=Roster

Field 1 - Name=Name, Type=Text

Field 2 - Name=Gender, Type=Popup

Field 3 - Name=Grade Level, Type=Popup

Field 4 - Name=Schedule, Type=Link

The properties of the Schedule field will need to be left blank for now, until the Schedule database has been created.

Step #2:

Once a database is set up with the necessary fields, the next step is to associate a form with it to be used in edit view.

a) To do this, with the database selected, select the "details" option in the lower right of the screen.

b) In the resulting dialog, choose the "forms" option on the right side of the wheel.

c) The next action to occur will be an automatic transfer into the HanDBase Forms program.

d) Select "new" to create a form for the database.

e) The next window that is visible provides the opportunity to define the initial parameters of the form, such as the background color, types of buttons, etc. Once finished with this task, select the "ok" button to move to the editing window of the Forms program.

f) In this window, various UI (user interface) controls such as text fields, buttons and checkboxes are able to be defined, associated with a field in the database and placed graphically on the screen.

Step #3:

As seen in the screenshots below, UI elements of labels can been created and placed on the form to correspond to the field names in the database.

a) To do this, press the [New] button and choose options for the popup list.

b) Next, a text field has been created for the "Name" field and positioned next to the "Name" label.

c) Popup items were also created for the "Gender" and "Grade Level" fields and placed near their respective labels. See the screenshots below for an illustration of this.

Step #4:

Once the form is created for the "Roster" database, it will later be linked it to a second database titled "Schedule". In HanDBase, create the "Schedule" database with the following field structure:

Database Name=Schedule

Field 1 - Name=Name, Type=Linked, Other Database Name=Roster, Other Field Name=Schedule

Field 2 - Name=Course_1, Type=Popup

Field 3 - Name=Course_2, Type=Popup

Field 4 - Name=Course_3, Type=Popup

Field 5 - Name=Course_4, Type=Popup

Field 6 - Name=Course_5, Type=Popup

Field 7 - Name=Course_6, Type=Popup

Field 8 - Name=Course_7, Type=Popup

Step #5:

Once the "Schedule" database has been created return to HanDBase and select the Roster database from the list. Tap the Details button to open DB Properties. Select Fields and then select the Schedule field. You will need to finish configuring the Link field in this database.

Field 4: Name = Schedule, Type=Link, Other Database Name=Schedule, Other Field Name=Name, Show Value From=Name

Step #6:

a) After you have modified the Link field in Roster return to the Choose Database screen and select the "Schedule" database, and then select the "Details" option.

b) Again, select "forms" on the right side of the resulting window.

c) Define the parameters such as background color, etc and click "ok".

d) In the form layout window, create UI element labels to match each of the field names, as illustrated in the screenshots.

e) Next, define a text field UI element and position it near the "Name" label.

f) After doing so, create pop-up UI elements that are associated with fields from the "Schedule" database and place them near their respective labels. See the screenshots below for a one possibility of layout.

Step #7:

Since the databases with forms have been created, the next step will be to create a UI control in each form that will jump from database form to database form.

a) To add this control, open the form associated with the "Roster" database as described above.

b) Select the "Roster" form and select "open".

c) Next, add a button UI element. Configure the button described below:

- General Tab

o Data Source = Schedule

o Caption Source = Other

o Caption = Add Schedule

- Layout Tab

o Be certain to adjust the width to accommodate the width of the label

- Actions Tab

o Action 1 = Jump to Form in other Database

o Form = Schedule

o Record = Open First Record

d) Note that in the Actions Tab, the "action" has been set to "Jump to Form in Other DB". Choosing this option creates the contextual items beneath it, in which the form from the other database is selected and which record to go to. The option can be made to open the first record, open the last record, create a new record, open first/last record or create.

e) Next, add another button UI element. Configure the button described below:

- General Tab

o Data Source = Schedule

o Caption Source = Other

o Caption = View/Edit Schedule

- Layout Tab

o Be certain to adjust the width to accommodate the width of the label

- Actions Tab

o Action 1 = Jump to Form in other Database

o Form = Schedule

o Record = Open First Record

d) This additional button will now let you View or Edit the Schedule for the particular student, after you've created it using the Add Schedule button.

Step #8:

After setting up HanDBase Forms 4 to use the ability to jump from one form to a form in another database as described in the previous steps, the following behaviors in the software can be observed:

Pressing the [Add Schedule] button in the Roster database will now jump to the form in the Schedule database. Pressing the Ok button in the Schedule database will save your changes and return to the form in the Roster database.

Pressing the [View/Edit Schedule] button in the Roster database will now jump to the form in the Schedule database, opening the first matching recored. This allows you to view or edit changes for this record. Pressing the Ok button in the Schedule database will save your changes and return to the form in the Roster database.

To summarize, this tutorial has introduced jumping from one database's form to another database's form as one of the many new features in HanDBase Forms 4. Additional resources, if needed, can be found at:

1 YouTube Video version of tutorial

2 Link to download the completed sample applet used in the tutorial


If further assistance is needed, please contact DDH Software's technical support at http://www.ddhsoftware.com/support


This article has been viewed 10847 times.

Return to Knowledgebase Home