DDH Software, LLC Making a big world smaller






Return to Knowledgebase Home
Tutorial 11: Conditionally Visible Form Items (Palm OS)
Product: HanDBase Forms for Palm OSArticle Number: 305Creation Date: 12/07/2007

- Topic: Conditional Display of UI Elements on Forms

- Product: HanDBase Forms

- Version: 4.0

- Date: November 24, 2007

- Handheld OS: Palm OS

- Desktop OS: Windows

Tutorial:

This tutorial's goal is to introduce the ability to conditionally display UI elements as a new feature in HanDBase Forms 4.0. This feature's main function is to allow or disallow UI elements to be displayed based on the value or state of another field. Being able to conditionally display UI elements extends the previous functionality of HanDBase Forms by allowing users to create more customized, intuitive user interfaces for collecting data. A practical example of this might be in the creation of grocery shopping list, an inventory system or attendance monitor. In this tutorial, the necessary steps to configure HanDBase Forms to take advantage of this new feature will be detailed. Then, the results of properly configuring conditionally displaying user interface elements will be examined. Finally, additional resources will be provided should any further information be needed.

To take advantage of the conditional display of UI elements HanDBase 4 and HanDBase Forms 4 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 first steps in configuring are:

Step #1:

a) Create a new database in HanDBase using the following configuration.

Database Title = "Grocery"

Field 1 - Name="Item", Type="Text"

Field 2 - Name="Purchase", Type="Check-Box"

Field 3 - Name="Quantity", Type="Integer"

Field 4 – Name=”Category”, Type=”Text”

Step #2:

a) Once the "Grocery" database has been created a form needs to be created that is associated with it. To accomplish this, highlight it in the list and select the "details" button in the lower right corner of the screen.

b) Once the next form displays, select the "Forms" option on the right side of the screen.

c) Configure the properties of the form, such as the name, background color and default buttons in the next dialog.

d) After finished, click "ok".

e) The next form appears as a grid with three buttons along the bottom, being "New", "Details" and "Delete".

Step #3:

a) The next step is to place the UI elements on the form.

b) Start by placing text labels on the grid that correspond to each of the four field names.

c) The next step is to place UI elements next to each of the respective field names. For the “Item” field, place a Text Box.

d) For the “Purchase” field, a Check-Box.

e) Again, place a Text Box for the “Quantity” field and finally a Pop-Up for the “Category” field. See the illustration below for an example of this.

f) The final step is to set the visibility of certain elements on the form to only be visible based on the value of another field. For this example, the value of the Purchase field will determine whether or not the Quanity and Category field information is shown. If the value of the Purchase field is zero (0) or the checkbox is unchecked, then the Quantity and Category fields are not visible. If the value is one, or the box is checked, then the fields are visible so that data can be entered into them.

g) To configure this, select each of the items one at a time and tap the “Details…” button.

h) On the Attributes tab, set the “visible” option to conditionally.

i) Choose the field that is to have a non-zero value to be the “Purchase” field.

j) The screenshot on the left illustrates configuring this option for the text field while the screenshot on the right illustrates it for the popup and labels.

After setting up HanDBase Forms 4 to make use of the ability to conditionally display UI elements on the form, when editing data in the form or when adding a new record, toggling the Purchase checkbox will indicate whether or not the Quantity and Category UI items are visible.

To summarize, this tutorial has introduced the ability to conditionally display UI elements as one of the many new features in HanDBase Forms 4. Additional resources, if needed, can be found at:

YouTube Video version of this tutorial

link to download database files 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 10489 times.

Return to Knowledgebase Home