Familiarizing Yourself With the Project Explorer

In this section:

How to:

The Project Explorer, which by default appears on the left side of your screen, displays another view of your project.

Currently, the only component here is Start, but as you continue working on the FanClub project, more components appear here.

If you expand Start, you see the following:

Project Explorer Start diagram tree

There is a folder for all of the forms in Start. Currently there is one form in it, Form1. If you expand it (not open it), you will see the text There are no items to show. When you create Start, this form is created by default.

The next component is called Top. Top is a function, which is a series of commands in a procedure grouped together as a unit of control. A function accomplishes some small task, such as calculating values, extracting data from a data source to place in a data source stack, or writing information to a data source.

Every procedure has a Top function, which consists of the command that runs immediately when the procedure runs. WebFOCUS Maintain automatically creates the Top function when you create a Maintain procedure.

Top of page

Procedure: How to Use a Data Source in a Procedure
  1. In the Project Explorer, right-click Start, and then click Use data sources.
  2. In the Use these Data Sources in Procedure Start dialog box, select fannames in the list of available data sources.
  3. Click the right arrow button to move fnnames button to move fannames into the list of Data sources to use, as shown in the following image.

  4. Click OK.

Top of page

Viewing the Structure of a Data Source in the Project Explorer

After you use the fannames data source in the Start procedure, its name appears in the Project Explorer underneath the Data Sources folder with a plus sign (+) next to it.

If you click the plus sign (+) next to fannames, WebFOCUS Maintain displays the segments in the fannames data source:

WebFOCUS fnnames data source tree diagram

A segment is a collection of fields that have a one-to-one relationship to each other. The fannames data source has one segment, called CUSTOMER.

Note: This data source has only one segment. Hierarchical data sources, such as FOCUS, can have more than one segment. If you would like to see data sources with more than one segment, migrate the CAR data source description (one of Information Builders standard sample files) into your project and view it. You can then delete the CAR data source description from your project by selecting it and clicking Delete.

If you click the plus sign (+) next to CUSTOMER, you see the fields in that segment, as shown in the image below.

WebFOCUS fnnames data source tree diagram

Since fannames has only one segment, these are the only fields in the fannames data source.

The key next to the SSN field indicates that SSN is a key field, which means it uniquely identifies the segment instance. In the fannames data source, each fan has one SSN, and no other fan should have the same number.